terraform-google-modules/terraform-google-cloud-storage

days_since_custom_time - syntax reference

mike-19 opened this issue · 3 comments

There appears to be a documentation error for the google provider raised an issue for correction [1]

by using an integer value for the lifecycle rule I am getting 400 Bad Request error, Can someone help here

lifecycle_rules = [{ action = { type = "Delete" } condition = { days_since_custom_time = 10 } }] }

Error: googleapi: Error 400: Invalid argument, invalid
{“error”:{“code”:400,“message”:“Invalid argument”,“errors”:[{“message”:“Invalid argument”,“domain”:“global”,“reason”:“invalid”}]}}:

I see the problem here
It's not defined in the lifecycle rule definition of the provider

num_newer_versions = lookup(lifecycle_rule.value.condition, "num_newer_versions", null)

adding days_since_custom_time = lookup(lifecycle_rule.value.condition, "days_since_custom_time", null)

worked

@mike-19 can you please re-open this issue? I just came across the same problem and it doesn't look to be solved in the module implementation. Thanks!

@morgante I believe this issue can now be closed