-
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
Add a data entry for google_storage_bucket #5311
Add a data entry for google_storage_bucket #5311
Comments
I have the same necessity, how this issue is going? thanks for your work. |
Could we please have an update on this particular request / issue? |
We also need this feature! 👍 |
We also do! |
* add streamingConifg.filter to updateMask * add test for update streaming config filter Signed-off-by: Modular Magician <[email protected]>
* add streamingConifg.filter to updateMask * add test for update streaming config filter Signed-off-by: Modular Magician <[email protected]>
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
Terraform can create buckets as
resource
s and has adata
entry forgoogle_storage_bucket_object
, allowing object metadata to be retrieved using the API. However, there is no way to look up metadata on a bucket directly without also having ownership of the bucket. In other words, there is currently nodata
source forgoogle_storage_bucket
.For me, the primary use case for this
data
source is to be able to look up the project that a particular storage bucket belongs to. For example, say I have a module that provisions pubsub notifications on a GCS bucket:modules/notify/variables.tf:
modules/notify/main.tf:
As a module author, I can either require that the module owns the bucket (not ideal and not always possible), or I can hope that the caller has correctly specified
project-containing-bucket
.It would be much nicer to have a
data
source for storage buckets:modules/notify/main.tf:
then we can refer to the bucket's project:
New or Affected Resource(s)
(new) Data source:
Potential Terraform Configuration
References
The relevant API is here
and since you're already doing the lookup, it would make sense to include some other output features beyond the project, likely most of the existing
storage_bucket
fieldsThe text was updated successfully, but these errors were encountered: