project_id property does not work in google_kms_key_ring
fenglin-ssb opened this issue · 1 comments
TL;DR
I use the following example to create a key ring and add a key.
`resource "google_kms_key_ring" "keyring" {
name = "keyring-example"
location = "global"
project_id = var.project_id
}
resource "google_kms_crypto_key" "example-asymmetric-sign-key" {
name = "crypto-key-example"
key_ring = google_kms_key_ring.keyring.id
purpose = "ASYMMETRIC_SIGN"
version_template {
algorithm = "EC_SIGN_P384_SHA384"
}
lifecycle {
prevent_destroy = true
}
}`
but even if i provided the project_id property, terraform is trying to create the keyring in the provider project.
Expected behavior
the keyring should be created in the project with provided project_id.
Observed behavior
error shows the terraform is trying to create the keyring in the provider project.
Terraform Configuration
resource "google_kms_key_ring" "dataflow-keyring" {
name = "dataflow-keyring"
project = var.project_id
location = var.region
}
resource "google_kms_crypto_key" "example-asymmetric-sign-key" {
name = "crypto-key-example"
key_ring = google_kms_key_ring.dataflow-keyring.id
purpose = "ASYMMETRIC_SIGN"
version_template {
algorithm = "EC_SIGN_P384_SHA384"
}
lifecycle {
prevent_destroy = true
}
}
Terraform Version
I am running terraform from atlantis, atlantis version commend provide the following version info:
Terraform v1.1.4
on linux_amd64
+ provider registry.terraform.io/hashicorp/google v3.90.1
+ provider registry.terraform.io/hashicorp/google-beta v3.90.1
+ provider registry.terraform.io/hashicorp/null v3.1.1
+ provider registry.terraform.io/hashicorp/random v3.2.0
+ provider registry.terraform.io/hashicorp/time v0.7.2
Your version of Terraform is out of date! The latest version
is 1.2.0. You can update by downloading from https://www.terraform.io/downloads.html
Additional information
No response
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days