Open
Description
Community Note
- Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
- Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
- If you are interested in working on this issue or have submitted a pull request, please leave a comment. If the issue is assigned to the "modular-magician" user, it is either in the process of being autogenerated, or is planned to be autogenerated soon. If the issue is assigned to a user, that user is claiming responsibility for the issue. If the issue is assigned to "hashibot", a community member has claimed the issue already.
Description
The google_cloudfunctions_function resource will not currently update if you change your source code. The current steps I use are:
- Render my .py file as a template_file
- Zip this as an archive_file
- Upload this .zip to GCS via google_storage_bucket_object
- Use the bucket/object name from step 3 when creating a google_cloudfunctions_function
This is similar to: https://www.terraform.io/docs/providers/google/r/cloudfunctions_function.html
If I update my .py, the object zip gets re-uploaded to GCS, but the function does not update. AWS Lambda has support for source_code_hash, which solves this: https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lambda_function#source_code_hash
New or Affected Resource(s)
- google_cloudfunctions_function
Potential Terraform Configuration
# Propose what you think the configuration to take advantage of this feature should look like.
# We may not use it verbatim, but it's helpful in understanding your intent.
References
- b/274818513