-
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
google_storage_bucket_object
is missing a generation output
#14117
google_storage_bucket_object
is missing a generation output
#14117
Comments
This would be really useful. Here's a regex to extract the generation in Terraform:
|
This would be reaaally nice to be able to do, especially in conjunction with |
@jc0b It's funny you mention this. This issue is exactly what provided the ummmph I needed to move to Cloud Build triggers to deploy Cloud Function changes. |
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
modular-magician
user, it is either in the process of being autogenerated, or is planned to be autogenerated soon. If an issue is assigned to a user, that user is claiming responsibility for the issue. If an issue is assigned tohashibot
, a community member has claimed the issue already.Terraform Version
Affected Resource(s)
google_storage_bucket_object
Terraform Configuration Files
Debug Output
N/A
Panic Output
N/A
Expected Behavior
I would expect
google_storage_bucket_object
to have a.generation
attribute.Downstream resources referencing this object via:
... will have a bad time because the reference doesn't reflect potential content changes in the object made by IaC.
🚨 This is why I am filing this as a bug, not a feature. 🚨
An example of such a resource: https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/dataflow_job
Generally downstream resources should reference a form like this, which incorporates the generation and is immutable:
Actual Behavior
The only place the generation appears to be surfaced at all is embedded in
media_link
, e.g.Steps to Reproduce
Try to access generation
Important Factoids
Mutable references in declarative infrastructure are incredibly problematic. Generally you want to reference immutable identifiers which change exactly when the resource changes, so that changes cascade through the dependency graph.
Better than simple vendor-enforced immutability is content-addressability, but alas the former is the best we are likely to see from GCS.
Another great example of this is tags vs. digests in Kubernetes, which is my personal "hill to die on".
References
This feels related but different: #10488
b/276933153
The text was updated successfully, but these errors were encountered: