-
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
google_gke_hub_feature: User cannot unset fleet default member config in TF #18441
google_gke_hub_feature: User cannot unset fleet default member config in TF #18441
Comments
Confirmed issue! When the MissingFieldError for field resource: resource is required |
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
Terraform Version & Provider Version(s)
Terraform vX.X.X
on
Affected Resource(s)
google_gke_hub_feature
Terraform Configuration
Debug Output
No response
Expected Behavior
Removing fleet_default_member_config from feature should be able to disable/delete/patch it
Actual Behavior
Assume the user has the following TF configuration for their FDC:
If they wanted to remove the FDC, they would edit the spec as follows (note how the entire fleet_default_member_config block is removed):
Doing so results in an error (see https://paste.googleplex.com/6020001638645760). It turns out that our logic for updating the Feature resource has a small bug. It's something we addressed in the gcloud implementation but failed to do in TF.
Basically, during the feature update we should make sure we always set the name of the resource to ensure that at least one field in the resource is being sent to the server. Here is an example of what we did on the gcloud side:
https://source.corp.google.com/piper///depot/google3/third_party/py/googlecloudsdk/surface/container/fleet/mesh/disable.py;l=69
Of course, the alternative is to fetch the full resource first, edit the fields you want to edit and then send that over. That would also ensure at least the name field is set.
Steps to reproduce
terraform apply
Important Factoids
No response
References
No response
b/347775033
The text was updated successfully, but these errors were encountered: