-
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
terraform-provider-google_v5.9.0_x5 plugin crashed! on resource google_container_attached_cluster update #16784
terraform-provider-google_v5.9.0_x5 plugin crashed! on resource google_container_attached_cluster update #16784
Comments
Panic output is:
This corresponds to https://github.com/hashicorp/terraform-provider-google/blob/v5.9.0/google/services/containerattached/resource_container_attached_cluster.go#L1174 orig := v.(map[string]interface{})["adminUsers"].([]interface{}) So it looks like adminUsers is not present in the "authorization" field of the API response. We have tests that exercise the authorization field (and pass in our nightly builds) but they all set both admin_users and admin_groups - possibly the adminUsers field is not returned if there's no value? I'm not able to run tests locally easily - I think there's some additional setup required - so I'm digging into this some more before handing off. It looks like the authorization field uses a custom flattener: https://github.com/GoogleCloudPlatform/magic-modules/blob/6afde3f9effd7c1c7298108a856395f220421201/mmv1/products/containerattached/Cluster.yaml#L287 This was added in GoogleCloudPlatform/magic-modules#6858 - I'm a little surprised it was necessary. This will need to be fixed there. Created a quick PR at GoogleCloudPlatform/magic-modules#9627 to double-check that this is reproducible. |
The test failed in the same way. Unfortunately since it's a panic I can't verify the API behavior from those results. |
Just FYI with admin_users and admin_groups together its not failing |
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
1.6.5
Affected Resource(s)
google_container_attached_cluster
Terraform Configuration Files
Debug Output
Panic Output
https://gist.github.com/roreviakin-clgx/67293bfc557f83f5fa9e2ef4496f1635
Expected Behavior
added authorisation section to resource it should be updated
Actual Behavior
panic raised
Steps to Reproduce
deploy resource google_container_attached_cluster without authorisation, after add authorisation and apply again
Important Factoids
References
b/316328522
The text was updated successfully, but these errors were encountered: