-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
r/aws_eks_addon: fix crash when updating pod_identity_association
#40168
Conversation
Community NoteVoting for Prioritization
For Submitters
|
df1515d
to
5a94863
Compare
Moving back into draft - removal of |
Previously attempting to update this argument would result in a crash similar to the following: ``` │ The plugin encountered an error, and failed to respond to the plugin.(*GRPCProvider).ApplyResourceChange call. The plugin logs may contain more details. ╵ Releasing state lock. This may take a few moments... Stack trace from the terraform-provider-aws_v5.76.0_x5 plugin: panic: interface conversion: interface {} is *schema.Set, not []interface {} goroutine 353 [running]: github.com/hashicorp/terraform-provider-aws/internal/service/eks.resourceAddonUpdate({0x1196189a8, 0x14001bbedb0}, 0x14006991c00, {0x1192eeb60, 0x140003aaa00}) github.com/hashicorp/terraform-provider-aws/internal/service/eks/addon.go:289 +0xdac github.com/hashicorp/terraform-provider-aws/internal/provider.New.(*wrappedResource).Update.interceptedHandler[...].func11(0x14006991c00?, {0x1192eeb60?, 0x140003aaa00}) github.com/hashicorp/terraform-provider-aws/internal/provider/intercept.go:113 +0x1d8 github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).update(0x1196189a8?, {0x1196189a8?, 0x140019e8ea0?}, 0xd?, {0x1192eeb60?, 0x140003aaa00?}) github.com/hashicorp/terraform-plugin-sdk/v2@v2.35.0/helper/schema/resource.go:835 +0x64 github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).Apply(0x14001899c00, {0x1196189a8, 0x140019e8ea0}, 0x140069c25b0, 0x14006991a80, {0x1192eeb60, 0x140003aaa00}) github.com/hashicorp/terraform-plugin-sdk/v2@v2.35.0/helper/schema/resource.go:947 +0x660 github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ApplyResourceChange(0x14002d944b0, {0x1196189a8?, 0x140019e8ae0?}, 0x14004cf2050) github.com/hashicorp/terraform-plugin-sdk/v2@v2.35.0/helper/schema/grpc_provider.go:1155 +0xaa4 github.com/hashicorp/terraform-plugin-mux/tf5muxserver.(*muxServer).ApplyResourceChange(0x14001323a00, {0x1196189a8?, 0x140019e3f20?}, 0x14004cf2050) github.com/hashicorp/terraform-plugin-mux@v0.17.0/tf5muxserver/mux_server_ApplyResourceChange.go:36 +0x184 github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(*server).ApplyResourceChange(0x140021172c0, {0x1196189a8?, 0x140019dd440?}, 0x140069cf7a0) github.com/hashicorp/terraform-plugin-go@v0.25.0/tfprotov5/tf5server/server.go:865 +0x2a8 github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ApplyResourceChange_Handler({0x119186d80, 0x140021172c0}, {0x1196189a8, 0x140019dd440}, 0x14006991700, 0x0) github.com/hashicorp/terraform-plugin-go@v0.25.0/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:611 +0x1c0 google.golang.org/grpc.(*Server).processUnaryRPC(0x1400159d000, {0x1196189a8, 0x140019dd170}, {0x1196985c0, 0x14002fba000}, 0x14003f85440, 0x14002dd7d40, 0x1241083f8, 0x0) google.golang.org/grpc@v1.67.1/server.go:1394 +0xb64 google.golang.org/grpc.(*Server).handleStream(0x1400159d000, {0x1196985c0, 0x14002fba000}, 0x14003f85440) google.golang.org/grpc@v1.67.1/server.go:1805 +0xb20 google.golang.org/grpc.(*Server).serveStreams.func2.1() google.golang.org/grpc@v1.67.1/server.go:1029 +0x84 created by google.golang.org/grpc.(*Server).serveStreams.func2 in goroutine 52 google.golang.org/grpc@v1.67.1/server.go:1040 +0x13c Error: The terraform-provider-aws_v5.76.0_x5 plugin crashed! ``` ```console % make testacc PKG=eks TESTS="TestAccEKSAddon_" make: Verifying source code with gofmt... ==> Checking that code complies with gofmt requirements... TF_ACC=1 go1.23.2 test ./internal/service/eks/... -v -count 1 -parallel 20 -run='TestAccEKSAddon_' -timeout 360m 2024/11/18 11:11:28 Initializing Terraform AWS Provider... --- PASS: TestAccEKSAddon_serviceAccountRoleARN (477.59s) --- PASS: TestAccEKSAddon_preserve (527.40s) --- PASS: TestAccEKSAddon_basic (541.70s) --- PASS: TestAccEKSAddon_Disappears_cluster (565.12s) --- PASS: TestAccEKSAddon_tags (589.28s) --- PASS: TestAccEKSAddon_podIdentityAssociation (590.06s) --- PASS: TestAccEKSAddon_addonVersion (623.80s) --- PASS: TestAccEKSAddon_deprecated (628.77s) --- PASS: TestAccEKSAddon_resolveConflicts (643.48s) --- PASS: TestAccEKSAddon_disappears (654.73s) --- PASS: TestAccEKSAddon_configurationValues (659.61s) PASS ok github.com/hashicorp/terraform-provider-aws/internal/service/eks 664.703s ```
5a94863
to
1cfdc41
Compare
Previously changes to the `pod_identity_association` argument did not properly trigger the update flow, resulting in persistent differences when attempting to add this argument. Additionally, removal of this argument did not send the correct value to the API to trigger deletion of the existing pod identity associations. This changes fixes both scenarios such that additional and removal of this argument should now function as expected. ```console % make testacc PKG=eks TESTS="TestAccEKSAddon_podIdentityAssociation" make: Verifying source code with gofmt... ==> Checking that code complies with gofmt requirements... TF_ACC=1 go1.23.2 test ./internal/service/eks/... -v -count 1 -parallel 20 -run='TestAccEKSAddon_podIdentityAssociation' -timeout 360m 2024/11/19 10:00:07 Initializing Terraform AWS Provider... --- PASS: TestAccEKSAddon_podIdentityAssociation (796.83s) PASS ok github.com/hashicorp/terraform-provider-aws/internal/service/eks 803.299s ```
1cfdc41
to
a9939ba
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🎉
% make t T=TestAccEKSAddon_ K=eks
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.23.2 test ./internal/service/eks/... -v -count 1 -parallel 20 -run='TestAccEKSAddon_' -timeout 360m
2024/11/19 13:36:04 Initializing Terraform AWS Provider...
=== RUN TestAccEKSAddon_basic
=== PAUSE TestAccEKSAddon_basic
=== RUN TestAccEKSAddon_disappears
=== PAUSE TestAccEKSAddon_disappears
=== RUN TestAccEKSAddon_Disappears_cluster
=== PAUSE TestAccEKSAddon_Disappears_cluster
=== RUN TestAccEKSAddon_addonVersion
=== PAUSE TestAccEKSAddon_addonVersion
=== RUN TestAccEKSAddon_preserve
=== PAUSE TestAccEKSAddon_preserve
=== RUN TestAccEKSAddon_deprecated
=== PAUSE TestAccEKSAddon_deprecated
=== RUN TestAccEKSAddon_resolveConflicts
=== PAUSE TestAccEKSAddon_resolveConflicts
=== RUN TestAccEKSAddon_serviceAccountRoleARN
=== PAUSE TestAccEKSAddon_serviceAccountRoleARN
=== RUN TestAccEKSAddon_configurationValues
=== PAUSE TestAccEKSAddon_configurationValues
=== RUN TestAccEKSAddon_podIdentityAssociation
=== PAUSE TestAccEKSAddon_podIdentityAssociation
=== RUN TestAccEKSAddon_tags
=== PAUSE TestAccEKSAddon_tags
=== CONT TestAccEKSAddon_basic
=== CONT TestAccEKSAddon_resolveConflicts
=== CONT TestAccEKSAddon_tags
=== CONT TestAccEKSAddon_disappears
=== CONT TestAccEKSAddon_serviceAccountRoleARN
=== CONT TestAccEKSAddon_configurationValues
=== CONT TestAccEKSAddon_podIdentityAssociation
=== CONT TestAccEKSAddon_addonVersion
=== CONT TestAccEKSAddon_deprecated
=== CONT TestAccEKSAddon_preserve
=== CONT TestAccEKSAddon_Disappears_cluster
--- PASS: TestAccEKSAddon_disappears (523.84s)
--- PASS: TestAccEKSAddon_deprecated (523.93s)
--- PASS: TestAccEKSAddon_addonVersion (539.90s)
--- PASS: TestAccEKSAddon_configurationValues (557.47s)
--- PASS: TestAccEKSAddon_tags (562.79s)
--- PASS: TestAccEKSAddon_resolveConflicts (587.50s)
--- PASS: TestAccEKSAddon_serviceAccountRoleARN (593.51s)
--- PASS: TestAccEKSAddon_Disappears_cluster (630.68s)
--- PASS: TestAccEKSAddon_basic (631.92s)
--- PASS: TestAccEKSAddon_preserve (632.48s)
--- PASS: TestAccEKSAddon_podIdentityAssociation (699.32s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/eks 703.438s
This functionality has been released in v5.77.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you! |
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
Description
Previously attempting to update this argument would result in a crash similar to the following:
Relations
Closes #40165
Relates #39973
References
Output from Acceptance Testing