-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Storage Bucket with unspecified location may fail #4422
Storage Bucket with unspecified location may fail #4422
Comments
I think the ideal solution here is for the location field to just be required, as the provider locations and the storage locations differ and so inferring them is hard. Unfortunately, making the field required is a breaking change, and so we need to wait for 4.0.0 to be able to do that. |
Actually, I'd propose the following inference logic if location is not explicitly defined :
I'm not sure that would be a breaking change ; if I'm not mistaken, it would not break anything currently working, only add extra working cases. |
location
field required in google_storage_bucket
terraform-google-modules/docs-examples#175
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
Community Note
Description
When creating a new bucket with an unspecified location, the
storage_class
along with the provider config values (default region and default zone) should be used to determine the correct location. Currently, for example, creating a bucket withstorage_class = "REGIONAL"
and no location specified will fail with the following error:The storage_class can be used to infer proper default values for the location.
New or Affected Resource(s)
Potential Terraform Configuration
The above code will currently fail. The location of the bucket could easily be inferred to be
europe-west2
which is the default provider region.The text was updated successfully, but these errors were encountered: