The "logging" input parameter is not taken into account
fleroux514 opened this issue · 1 comments
fleroux514 commented
TL;DR
When specifying the "logging" parameter with the name of another bucket, the resulting created "google_storage_bucket" resource is not configured with the attribute.
For instance using this config
module "some_bucket" {
source = "terraform-google-modules/cloud-storage/google"
version = "4.0.0"
project_id = 1234
storage_class = "STANDARD"
location = "northamerica-northeast1-a"
prefix = ""
names = ["some-bucket"]
versioning = { "some-bucket" = true }
randomize_suffix = false
logging = { log_bucket = "log-access-bucket" }
}
module "buckets_log_access" {
source = "terraform-google-modules/cloud-storage/google"
version = "4.0.0"
project_id = 1234
storage_class = "STANDARD"
location = "northamerica-northeast1-a"
prefix = ""
names = ["log-access-bucket"]
versioning = { log-access-bucket = true }
randomize_suffix = false
}
Expected behavior
Terraform plan output should show the "logging" attribute set to "log-access-bucket".
Observed behavior
Terraform output does not show the "logging" attribute for the bucket named "some-bucket":
Terraform will perform the following actions:
...
# module.some_bucket.google_storage_bucket.buckets["some-bucket"] will be created
+ resource "google_storage_bucket" "buckets" {
+ default_event_based_hold = false
+ force_destroy = false
+ id = (known after apply)
+ labels = {
+ "name" = "some-bucket"
}
+ location = "NORTHAMERICA-NORTHEAST1-A"
+ name = "some-bucket"
+ project = "1234"
+ public_access_prevention = "inherited"
+ self_link = (known after apply)
+ storage_class = "STANDARD"
+ uniform_bucket_level_access = true
+ url = (known after apply)
+ versioning {
+ enabled = true
}
}
Terraform Configuration
module "some_bucket" {
source = "terraform-google-modules/cloud-storage/google"
version = "4.0.0"
project_id = 1234
storage_class = "STANDARD"
location = "northamerica-northeast1-a"
prefix = ""
names = ["some-bucket"]
versioning = { "some-bucket" = true }
randomize_suffix = false
logging = { log_bucket = "log-access-bucket" }
}
module "buckets_log_access" {
source = "terraform-google-modules/cloud-storage/google"
version = "4.0.0"
project_id = 1234
storage_class = "STANDARD"
location = "northamerica-northeast1-a"
prefix = ""
names = ["log-access-bucket"]
versioning = { log-access-bucket = true }
randomize_suffix = false
}
Terraform Version
1.5.3
Additional information
No response
github-actions commented
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