-
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
Error updating {{resource}}: The update_mask in the Update{{resource}}Request must be set #16091
Error updating {{resource}}: The update_mask in the Update{{resource}}Request must be set #16091
Comments
the same with subscriptions
in plan
|
It seems like terraform thinks there are resources to update and fails on the first apply with the errors describe above (both for topics and subscriptions). Every new apply "syncs" a new resource type. When all types have synced it will report |
@hspens thank you. the workaround works but in some cases I had to run apply few times to fix all subscriptions |
Sorry for the problem. I will look at it. |
I think these APIs are rejecting spurious updates- @zli82016 can probably guard making the update call on a nonzero number of entries being added to the update mask. Most of these spurious calls should be a no-op as that's the default / standard behaviour for GCP APIs, but some will reject the call as y'all have found.
Before we ship a fix, the following workarounds you can:
|
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
Terraform v1.5.7
hashicorp/google 5.0.0
Affected Resource(s)
google_pubsub_topic
edit: Updated with the following resources as I ran into similar issues with those as well
google_pubsub_subscription
google_certificate_manager_certificate_map
google_certificate_manager_dns_authorization
google_certificate_manager_certificate
Terraform Configuration Files
Upgrading to the
5.0.0
provider caused the issue. No manual change involved.Terraform wants to do the following:
We aren't using any
default_labels
on the provider. Onlylabels
on the terraform resource.Debug Output
Apply fails with:
Panic Output
Expected Behavior
Apply should have been successful.
Actual Behavior
Apply failed due to
update_mask
being empty on theUpdateTopicRequest
. Looking at the go code for this it seems like there was a recent addition in theresource_pubsub_topic.go
file: 3e00cfb#diff-48620e991ba2fc65e445167722a633eb4f8b7707be51c2cd8cee9404152b393cR457-R460which removes the
hasChanged
check forlabels
and adds one foreffective_labels
instead. I don't see anything aboutterraform_labels
there but that might not triggerlabels
to be added to theupdateMask
?I'm not seeing any
effective_labels
in my terraform plan either so I don't really see anything that would lead tolabels
being added to theupdateMask
.Steps to Reproduce
upgrade google provider from 4.80.0 -> 5.0.0
terraform apply
Important Factoids
References
The text was updated successfully, but these errors were encountered: