-
Notifications
You must be signed in to change notification settings - Fork 180
Open
Labels
P3medium priority issuesmedium priority issuesenhancementNew feature or requestNew feature or requesttriagedScoped and ready for workScoped and ready for work
Description
Overview
When creating KMS keyring binding, I got following error message:
Invalid KeyRing id format, expecting `{projectId}/{locationId}/{keyRingName}` or `{locationId}/{keyRingName}.`
Code used when I got the error below:
module "gha_service_account" {
source = "terraform-google-modules/service-accounts/google"
version = "3.0.1"
project_id = var.project
prefix = "gha"
names = ["master-sa"]
project_roles = [
]
display_name = "Github Actions SA"
description = "Service Account used for Github Actions"
generate_keys = true
}
module "kms_key_ring-iam-bindings" {
source = "terraform-google-modules/iam/google//modules/kms_key_rings_iam"
version = "6.4.1"
kms_key_rings = [
"master-keyring",
]
mode = "authoritative"
bindings = {
"roles/cloudkms.cryptoKeyDecrypter" = [
"serviceAccount:${module.gha_service_account.email}",
]
}
}
Solved this by just adding global/
before master-keyring
as it was created as global
resource.
Metadata
Metadata
Assignees
Labels
P3medium priority issuesmedium priority issuesenhancementNew feature or requestNew feature or requesttriagedScoped and ready for workScoped and ready for work