Open leandrogoe opened 1 month ago
Confirmed issue!
After creating the resources each attempt to change the variable value fails with the next error:
Error: Error while updating cloudfunction configuration: googleapi: Error 400: The request has errors
β Details:
β [
β {
β "@type": "type.googleapis.com/google.rpc.BadRequest",
β "fieldViolations": [
β {
β "description": "build environment variables are not supported by this runtime",
β "field": "build_environment_variables"
β }
β ]
β }
β ]
β , badRequest
β
β with module.pgp_decryption.google_cloudfunctions_function.my_simple_function,
β on main.tf line 17, in resource "google_cloudfunctions_function" "my_simple_function":
β 17: resource "google_cloudfunctions_function" "my_simple_function" {
This is a critical issue.
The google_cloudfunctions_function resource has become unreliable in certain scenarios. It appears that GCP is doing a partial rollout, as this problem does not affect all environments yet. Many pipelines are breaking, but inconsistently across environments. This is particularly important for deploying specific versions of functions in these environments.
Does anyone have any official information from GCP about this change?
Absolutely critical issue! hit this today in prod env, that was crazy insane... error and error and error... what is going on, Google???
after multi-hours of stupid debugging the workaround was to degrade runtime and then put it back but why???
Same error message received with python39/310 runtime. Note that this is probably an issue unrelated to this provider, since the same error message pops up in Console.
This is very tricky and intermittent (floating) issue.. I hit it once (see above) and then it's gone... running same tf scripts/env/vars not able to reproduce anymore it means this is smth Google-related and not a permanent issue, unfortunately
I got the information from GCP support that bugfix will roll out next week, so fingers crossed. This is indeed not a provider bug.
Community Note
Terraform Version & Provider Version(s)
Terraform v1.4.0 on darwin_arm64
Affected Resource(s)
google_cloudfunctions_function
Terraform Configuration
Debug Output
No response
Expected Behavior
When changing the value of any of build_environment_variables terraform should be able to handle it properly
Actual Behavior
When changing the value of any of build_environment_variables for an EXISTING cloud function terraform fails:
Looking at the logs, it appears that there is a problem with the PATCH method of the Google API. Whenever you try to update the
build_environment_variables
you also need to include theruntime
in the update mask for it to succeed.Steps to reproduce
terraform apply -var="some_variable=1"
terraform apply -var="some_variable=2"
The first apply succeeds, but the second one fails with the error above.
Important Factoids
No response
References
No response
b/343970055