-
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
Cloud function fails to update when migrated from gcloud #7921
Cloud function fails to update when migrated from gcloud #7921
Comments
@afafara Can you share the imported state, and specify what did you change before |
@edwardmedia debug log and statefile: https://gist.github.com/afafara/2aa85a4bc65efe7088c5fc3d4052e537 Steps:
According to API reference it can be either |
@afafara Looked at the state, it seems |
@edwardmedia Terraform Google provider currently does not use that method (see #3085), and |
Hm, ok so the easy solution would be to remove the |
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. If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks! |
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
Terraform v0.13.5
Affected Resource(s)
Terraform Configuration Files
Expected Behavior
Terraform updates cloud function.
Actual Behavior
Terraform fails with error:
Steps to Reproduce
gcloud functions deploy function-test --region europe-west1 --entry-point helloWorld --trigger-http --runtime nodejs10 --source function-source
terraform import google_cloudfunctions_function.function some-project/europe-west1/function-test
terraform apply
with above config.Important Factoids
Upgrading function that was created with gcloud using local source, importing and applying with changing source to bucket object fails, because patch method tries to set both
sourceArchiveUrl
(GCS object) andsourceUploadUrl
(local upload).This was introduced with PR #7723, "read before patch".
References
The text was updated successfully, but these errors were encountered: