Skip to content
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/eks_addon: Deprecate resolve_conflicts attribute #29555

Merged
merged 11 commits into from
May 9, 2023

Conversation

mattburgess
Copy link
Collaborator

@mattburgess mattburgess commented Feb 21, 2023

Description

This deprecates the resolve_conflicts attribute in favour of 2 new attributes: resolve_conflicts_on_create and resolve_conflicts_on_update.

The CreateAddon API only permits values of NONE and OVERWRITE. The UpdateAddon API permits values of NONE, OVERWRITE and PRESERVE.

Therefore, when applying Terraform configuration for the first time, you're not able to specify PRESERVE, but that might well be the desired setting for ongoing updates to an addon.

By splitting the attribute into 2, a single configuration can be provided for both initial, and followup addon configurations.

Relations

Closes #27481

References

Output from Acceptance Testing

$ make testacc TESTS=TestAccEKSAddon_deprecated PKG=eks
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/eks/... -v -count 1 -parallel 20 -run='TestAccEKSAddon_deprecated'  -timeout 180m
=== RUN   TestAccEKSAddon_deprecated
=== PAUSE TestAccEKSAddon_deprecated
=== CONT  TestAccEKSAddon_deprecated
--- PASS: TestAccEKSAddon_deprecated (683.40s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/eks	683.496s
$ make testacc TESTS=TestAccEKSAddon_resolveConflicts PKG=eks
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/eks/... -v -count 1 -parallel 20 -run='TestAccEKSAddon_resolveConflicts'  -timeout 180m
=== RUN   TestAccEKSAddon_resolveConflicts
=== PAUSE TestAccEKSAddon_resolveConflicts
=== CONT  TestAccEKSAddon_resolveConflicts
--- PASS: TestAccEKSAddon_resolveConflicts (721.19s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/eks	721.282s

@github-actions
Copy link

Community Note

Voting for Prioritization

  • Please vote on this pull request by adding a 👍 reaction to the original post to help the community and maintainers prioritize this pull request.
  • Please see our prioritization guide for information on how we prioritize.
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.

For Submitters

  • Review the contribution guide relating to the type of change you are making to ensure all of the necessary steps have been taken.
  • For new resources and data sources, use skaff to generate scaffolding with comments detailing common expectations.
  • Whether or not the branch has been rebased will not impact prioritization, but doing so is always a welcome surprise.

@github-actions github-actions bot added size/L Managed by automation to categorize the size of a PR. needs-triage Waiting for first response or review from a maintainer. documentation Introduces or discusses updates to documentation. service/eks Issues and PRs that pertain to the eks service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Feb 21, 2023
@ewbankkit ewbankkit removed the needs-triage Waiting for first response or review from a maintainer. label Mar 8, 2023
@ewbankkit ewbankkit added this to the v5.0.0 milestone Mar 8, 2023
@ewbankkit ewbankkit changed the base branch from main to prerelease/5.x May 9, 2023 13:15
@github-actions github-actions bot added size/XL Managed by automation to categorize the size of a PR. provider Pertains to the provider itself, rather than any interaction with AWS. service/vpc Issues and PRs that pertain to the vpc service. and removed size/L Managed by automation to categorize the size of a PR. labels May 9, 2023
@bryantbiggs
Copy link
Contributor

bryantbiggs commented May 9, 2023

@ewbankkit question: If EKS were to change the API where the create operation only shows none or overwrite (removes preserve even though its not supported), does this change the PR here?

For example, if the input specification for createAddon changed from:

ResolveConflicts *string `locationName:"resolveConflicts" type:"string" enum:"ResolveConflicts"`

To

ResolveConflicts *string `locationName:"resolveConflicts" type:"string" enum:"CreateResolveConflicts"`

How would that affect the provider implementation - would we still keep one argument for the resolve_conflicts, would we split into two like this PR is adding, something else?

https://docs.aws.amazon.com/eks/latest/APIReference/API_CreateAddon.html#AmazonEKS-CreateAddon-request-resolveConflicts

@ewbankkit
Copy link
Contributor

@bryantbiggs I think we'd still need this PR but we'd enhance by using the different enumeration as part of validation.

@bryantbiggs
Copy link
Contributor

ok cool - so the provider arguments would stay as is (per what is added here) and therefore no breaking change, the only changes would be made to the internal implementation of the provider. thank you!

Copy link
Contributor

@ewbankkit ewbankkit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀.

% make testacc TESTARGS='-run=TestAccEKSAddon_' PKG=eks ACCTEST_PARALLELISM=2
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/eks/... -v -count 1 -parallel 2  -run=TestAccEKSAddon_ -timeout 180m
=== 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_tags
=== PAUSE TestAccEKSAddon_tags
=== CONT  TestAccEKSAddon_basic
=== CONT  TestAccEKSAddon_deprecated
--- PASS: TestAccEKSAddon_basic (745.25s)
=== CONT  TestAccEKSAddon_configurationValues
--- PASS: TestAccEKSAddon_deprecated (718.20s)
=== CONT  TestAccEKSAddon_tags
--- PASS: TestAccEKSAddon_configurationValues (646.46s)
=== CONT  TestAccEKSAddon_serviceAccountRoleARN
--- PASS: TestAccEKSAddon_tags (698.59s)
=== CONT  TestAccEKSAddon_resolveConflicts
--- PASS: TestAccEKSAddon_serviceAccountRoleARN (573.52s)
=== CONT  TestAccEKSAddon_addonVersion
--- PASS: TestAccEKSAddon_resolveConflicts (774.49s)
=== CONT  TestAccEKSAddon_preserve
--- PASS: TestAccEKSAddon_addonVersion (784.72s)
=== CONT  TestAccEKSAddon_Disappears_cluster
--- PASS: TestAccEKSAddon_preserve (758.49s)
=== CONT  TestAccEKSAddon_disappears
--- PASS: TestAccEKSAddon_Disappears_cluster (727.07s)
--- PASS: TestAccEKSAddon_disappears (730.87s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/eks	3684.993s

@ewbankkit ewbankkit merged commit f3f9004 into hashicorp:prerelease/5.x May 9, 2023
@github-actions
Copy link

This functionality has been released in v5.0.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!

@github-actions
Copy link

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.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 25, 2023
@justinretzolk justinretzolk added the external-maintainer Contribution from a trusted external contributor. label Jul 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Introduces or discusses updates to documentation. external-maintainer Contribution from a trusted external contributor. provider Pertains to the provider itself, rather than any interaction with AWS. service/eks Issues and PRs that pertain to the eks service. service/vpc Issues and PRs that pertain to the vpc service. size/XL Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: aws_eks_addon fails creation with resolve_conflicts = "PRESERVE"
4 participants