You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On module ""cloud-storage" and sub-module "cloud-storage_simple_bucket", using action type "SetStorageClass" on the "lifecycle_rules" is not working
#347
Closed
oralmeida opened this issue
Sep 19, 2024
· 2 comments
Can't create a bucket using action type "SetStorageClass" on the "lifecycle_rules".
Tried the module "cloud-storage" and sub-module "cloud-storage_simple_bucket" with same result.
Expected behavior
Bucket is created with lifecycle based on SetStorageClass
Observed behavior
Terraform will perform the following actions:
module.cloud-storage_simple_bucket["archive"].google_storage_bucket.bucket will be updated in-place
~ resource "google_storage_bucket" "bucket" {
id = "XXX"
name = "XXX"
# (15 unchanged attributes hidden)
Terraform v1.6.2
on linux_amd64
+ provider registry.terraform.io/hashicorp/external v2.3.4
+ provider registry.terraform.io/hashicorp/google v5.42.0
+ provider registry.terraform.io/hashicorp/google-beta v5.42.0
+ provider registry.terraform.io/hashicorp/null v3.2.3
+ provider registry.terraform.io/hashicorp/random v3.6.3
Your version of Terraform is out of date! The latest version
is 1.9.5. You can update by downloading from https://www.terraform.io/downloads.html
Additional information
No response
The text was updated successfully, but these errors were encountered:
Inside actions object it should be storage_class instead of storageClass.
Since the keyword is wrong the target storage class is going as null and that could be an issue
TL;DR
Can't create a bucket using action type "SetStorageClass" on the "lifecycle_rules".
Tried the module "cloud-storage" and sub-module "cloud-storage_simple_bucket" with same result.
Expected behavior
Bucket is created with lifecycle based on SetStorageClass
Observed behavior
Terraform will perform the following actions:
module.cloud-storage_simple_bucket["archive"].google_storage_bucket.bucket will be updated in-place
~ resource "google_storage_bucket" "bucket" {
id = "XXX"
name = "XXX"
# (15 unchanged attributes hidden)
Plan: 0 to add, 1 to change, 0 to destroy.
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Saved the plan to: tfplan
To perform exactly these actions, run the following command to apply:
terraform apply "tfplan"
$ terraform apply "tfplan"
module.cloud-storage_simple_bucket["archive"].google_storage_bucket.bucket: Modifying... [id=XXX]
╷
│ Error: googleapi: Error 400: Invalid argument., invalid
│
│ with module.cloud-storage_simple_bucket["archive"].google_storage_bucket.bucket,
│ on .terraform/modules/cloud-storage_simple_bucket/modules/simple_bucket/main.tf line 17, in resource "google_storage_bucket" "bucket":
│ 17: resource "google_storage_bucket" "bucket" {
Terraform Configuration
Terraform Version
Terraform v1.6.2 on linux_amd64 + provider registry.terraform.io/hashicorp/external v2.3.4 + provider registry.terraform.io/hashicorp/google v5.42.0 + provider registry.terraform.io/hashicorp/google-beta v5.42.0 + provider registry.terraform.io/hashicorp/null v3.2.3 + provider registry.terraform.io/hashicorp/random v3.6.3 Your version of Terraform is out of date! The latest version is 1.9.5. You can update by downloading from https://www.terraform.io/downloads.html
Additional information
No response
The text was updated successfully, but these errors were encountered: