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

Add support for bootstrapSelfManagedAddons flag in aws_eks_cluster resource #38162

Conversation

bdalpe
Copy link
Contributor

@bdalpe bdalpe commented Jun 27, 2024

Description

Adds a new argument/parameter bootstrap_self_managed_addons to the aws_ecs_cluster resource schema. This is an optional parameter. There is no change the current behavior for creating clusters.

Setting bootstrap_self_managed_addons = false disables EKS from installing VPC CNI, CoreDNS, and kube-proxy add-ons by default. Cluster admins will be required to manually install a CNI to ensure their newly created cluster is fully operational.

Relations

Closes #38156

References

Output from Acceptance Testing

Only ran the new acceptance test. If more testing is required/desired, I'm happy to update with those results later.

% make testacc TESTS=TestAccEKSCluster_BootstrapSelfManagedAddons PKG=eks
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.22.4 test ./internal/service/eks/... -v -count 1 -parallel 20 -run='TestAccEKSCluster_BootstrapSelfManagedAddons'  -timeout 360m
=== RUN   TestAccEKSCluster_BootstrapSelfManagedAddons_update
=== PAUSE TestAccEKSCluster_BootstrapSelfManagedAddons_update
=== CONT  TestAccEKSCluster_BootstrapSelfManagedAddons_update
--- PASS: TestAccEKSCluster_BootstrapSelfManagedAddons_update (1210.69s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/eks        1215.247s

This flag is only passed on resource creation and cannot be read from the AWS API

Signed-off-by: Brendan Dalpe <[email protected]>
@bdalpe bdalpe requested a review from a team as a code owner June 27, 2024 20:33
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 documentation Introduces or discusses updates to documentation. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. service/eks Issues and PRs that pertain to the eks service. size/M Managed by automation to categorize the size of a PR. labels Jun 27, 2024
@terraform-aws-provider terraform-aws-provider bot added the needs-triage Waiting for first response or review from a maintainer. label Jun 27, 2024
Copy link

Thank you for your contribution! 🚀

Please note that typically Go dependency changes are handled in this repository by dependabot or the maintainers. This is to prevent pull request merge conflicts and further delay reviews of contributions. Remove any changes to the go.mod or go.sum files and commit them into this pull request.

Additional details:

  • Check open pull requests with the dependencies label to view other dependency updates.
  • If this pull request includes an update the AWS Go SDK (or any other dependency) version, only updates submitted via dependabot will be merged. This pull request will need to remove these changes and will need to be rebased after the existing dependency update via dependabot has been merged for this pull request to be reviewed.
  • If this pull request is for supporting a new AWS service:
    • Ensure the new AWS service changes are following the Contributing Guide section on new services, in particular that the dependency addition and initial provider support are in a separate pull request from other changes (e.g. new resources). Contributions not following this item will not be reviewed until the changes are split.
    • If this pull request is already a separate pull request from the above item, you can ignore this message.

Signed-off-by: Brendan Dalpe <[email protected]>
Signed-off-by: Brendan Dalpe <[email protected]>
@justinretzolk justinretzolk added enhancement Requests to existing resources that expand the functionality or scope. and removed needs-triage Waiting for first response or review from a maintainer. labels Jun 27, 2024
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 🚀.

% ACCTEST_TIMEOUT=720m make testacc TESTARGS='-run=TestAccEKSCluster_' PKG=eks ACCTEST_PARALLELISM=3  
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.22.4 test ./internal/service/eks/... -v -count 1 -parallel 3  -run=TestAccEKSCluster_ -timeout 720m
=== RUN   TestAccEKSCluster_basic
=== PAUSE TestAccEKSCluster_basic
=== RUN   TestAccEKSCluster_disappears
=== PAUSE TestAccEKSCluster_disappears
=== RUN   TestAccEKSCluster_AccessConfig_create
=== PAUSE TestAccEKSCluster_AccessConfig_create
=== RUN   TestAccEKSCluster_AccessConfig_update
=== PAUSE TestAccEKSCluster_AccessConfig_update
=== RUN   TestAccEKSCluster_BootstrapSelfManagedAddons_update
=== PAUSE TestAccEKSCluster_BootstrapSelfManagedAddons_update
=== RUN   TestAccEKSCluster_BootstrapSelfManagedAddons_migrate
=== PAUSE TestAccEKSCluster_BootstrapSelfManagedAddons_migrate
=== RUN   TestAccEKSCluster_Encryption_create
=== PAUSE TestAccEKSCluster_Encryption_create
=== RUN   TestAccEKSCluster_Encryption_update
=== PAUSE TestAccEKSCluster_Encryption_update
=== RUN   TestAccEKSCluster_Encryption_versionUpdate
=== PAUSE TestAccEKSCluster_Encryption_versionUpdate
=== RUN   TestAccEKSCluster_version
=== PAUSE TestAccEKSCluster_version
=== RUN   TestAccEKSCluster_logging
=== PAUSE TestAccEKSCluster_logging
=== RUN   TestAccEKSCluster_tags
=== PAUSE TestAccEKSCluster_tags
=== RUN   TestAccEKSCluster_VPC_securityGroupIDs
=== PAUSE TestAccEKSCluster_VPC_securityGroupIDs
=== RUN   TestAccEKSCluster_VPC_securityGroupIDsAndSubnetIDs_update
=== PAUSE TestAccEKSCluster_VPC_securityGroupIDsAndSubnetIDs_update
=== RUN   TestAccEKSCluster_VPC_endpointPrivateAccess
=== PAUSE TestAccEKSCluster_VPC_endpointPrivateAccess
=== RUN   TestAccEKSCluster_VPC_endpointPublicAccess
=== PAUSE TestAccEKSCluster_VPC_endpointPublicAccess
=== RUN   TestAccEKSCluster_VPC_publicAccessCIDRs
=== PAUSE TestAccEKSCluster_VPC_publicAccessCIDRs
=== RUN   TestAccEKSCluster_Network_serviceIPv4CIDR
=== PAUSE TestAccEKSCluster_Network_serviceIPv4CIDR
=== RUN   TestAccEKSCluster_Network_ipFamily
=== PAUSE TestAccEKSCluster_Network_ipFamily
=== RUN   TestAccEKSCluster_Outpost_create
=== PAUSE TestAccEKSCluster_Outpost_create
=== RUN   TestAccEKSCluster_Outpost_placement
=== PAUSE TestAccEKSCluster_Outpost_placement
=== CONT  TestAccEKSCluster_basic
=== CONT  TestAccEKSCluster_tags
=== CONT  TestAccEKSCluster_VPC_publicAccessCIDRs
--- PASS: TestAccEKSCluster_basic (648.61s)
=== CONT  TestAccEKSCluster_Encryption_create
--- PASS: TestAccEKSCluster_tags (711.05s)
=== CONT  TestAccEKSCluster_logging
--- PASS: TestAccEKSCluster_VPC_publicAccessCIDRs (1047.79s)
=== CONT  TestAccEKSCluster_version
--- PASS: TestAccEKSCluster_Encryption_create (638.07s)
=== CONT  TestAccEKSCluster_Encryption_versionUpdate
--- PASS: TestAccEKSCluster_logging (733.29s)
=== CONT  TestAccEKSCluster_Encryption_update
--- PASS: TestAccEKSCluster_version (1233.36s)
=== CONT  TestAccEKSCluster_AccessConfig_update
--- PASS: TestAccEKSCluster_Encryption_versionUpdate (1209.80s)
=== CONT  TestAccEKSCluster_BootstrapSelfManagedAddons_migrate
--- PASS: TestAccEKSCluster_Encryption_update (1578.94s)
=== CONT  TestAccEKSCluster_BootstrapSelfManagedAddons_update
--- PASS: TestAccEKSCluster_BootstrapSelfManagedAddons_migrate (535.06s)
=== CONT  TestAccEKSCluster_VPC_endpointPrivateAccess
--- PASS: TestAccEKSCluster_AccessConfig_update (1502.96s)
=== CONT  TestAccEKSCluster_VPC_endpointPublicAccess
--- PASS: TestAccEKSCluster_BootstrapSelfManagedAddons_update (1332.88s)
=== CONT  TestAccEKSCluster_VPC_securityGroupIDsAndSubnetIDs_update
--- PASS: TestAccEKSCluster_VPC_endpointPrivateAccess (1544.70s)
=== CONT  TestAccEKSCluster_AccessConfig_create
--- PASS: TestAccEKSCluster_VPC_endpointPublicAccess (1100.62s)
=== CONT  TestAccEKSCluster_Outpost_create
    cluster_test.go:846: skipping since no Outposts found
--- SKIP: TestAccEKSCluster_Outpost_create (0.40s)
=== CONT  TestAccEKSCluster_Outpost_placement
    cluster_test.go:879: skipping since no Outposts found
--- SKIP: TestAccEKSCluster_Outpost_placement (0.18s)
=== CONT  TestAccEKSCluster_Network_ipFamily
--- PASS: TestAccEKSCluster_AccessConfig_create (753.65s)
=== CONT  TestAccEKSCluster_Network_serviceIPv4CIDR
--- PASS: TestAccEKSCluster_VPC_securityGroupIDsAndSubnetIDs_update (1507.97s)
=== CONT  TestAccEKSCluster_VPC_securityGroupIDs
--- PASS: TestAccEKSCluster_Network_ipFamily (1341.61s)
=== CONT  TestAccEKSCluster_disappears
--- PASS: TestAccEKSCluster_VPC_securityGroupIDs (726.03s)
--- PASS: TestAccEKSCluster_Network_serviceIPv4CIDR (1318.65s)
--- PASS: TestAccEKSCluster_disappears (693.30s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/eks	6924.995s

@ewbankkit
Copy link
Contributor

@bdalpe Thanks for the contribution 🎉 👏.

Copy link

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

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 Aug 12, 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. enhancement Requests to existing resources that expand the functionality or scope. service/eks Issues and PRs that pertain to the eks service. size/M 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.

[Enhancement]: Add support for bootstrapSelfManagedAddons flag in aws_eks_cluster resource
3 participants