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

resource/aws_eks_node_group: add support for node_group_name prefixes #13938

Merged
merged 5 commits into from
May 12, 2021

Conversation

dstevensson
Copy link

Community Note

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

Release note for CHANGELOG:

resource/aws_eks_node_group: Add `node_group_name_prefix`.
resource/aws_eks_node_group: `node_group_name` is optional.

Output from acceptance testing:

$ make testacc TEST=./aws TESTARGS='-run=TestAccAWSEksNodeGroup_NamePrefix'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSEksNodeGroup_NamePrefix -timeout 120m
=== RUN   TestAccAWSEksNodeGroup_NamePrefix
=== PAUSE TestAccAWSEksNodeGroup_NamePrefix
=== CONT  TestAccAWSEksNodeGroup_NamePrefix
--- PASS: TestAccAWSEksNodeGroup_NamePrefix (1331.83s)
PASS
ok      github.com/terraform-providers/terraform-provider-aws/aws       1331.894s
...

This PR adds functionality to use prefixes for naming EKS node groups which allows you to use life cycle arguments such as create_before_destroy. node_group_name is moved to optional with with a random unique value if omitted.

@dstevensson dstevensson requested a review from a team June 25, 2020 10:46
@ghost ghost added size/M Managed by automation to categorize the size of a PR. needs-triage Waiting for first response or review from a maintainer. service/eks Issues and PRs that pertain to the eks service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. documentation Introduces or discusses updates to documentation. labels Jun 25, 2020
Base automatically changed from master to main January 23, 2021 00:58
@breathingdust breathingdust requested a review from a team as a code owner January 23, 2021 00:58
Didrik Stevensson and others added 2 commits May 12, 2021 11:30
not all node group properties can be updated via the API, making many
changes require a replacement of the resource. To make this seamless
with create_before_destroy, Terraform should allow for the name to be
automatically computed.
@ewbankkit ewbankkit force-pushed the f-aws_eks_node_group-prefix branch from 7236354 to 4da5bf1 Compare May 12, 2021 15:30
@ghost ghost added size/L Managed by automation to categorize the size of a PR. and removed size/M Managed by automation to categorize the size of a PR. labels May 12, 2021
@ewbankkit ewbankkit removed the needs-triage Waiting for first response or review from a maintainer. label May 12, 2021
@ghost ghost added size/XL Managed by automation to categorize the size of a PR. and removed size/L Managed by automation to categorize the size of a PR. labels May 12, 2021
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 🚀.

Commercial
% make testacc TEST=./aws TESTARGS='-run=TestAccAWSEksNodeGroup_basic\|TestAccAWSEksNodeGroup_Name_Generated\|TestAccAWSEksNodeGroup_NamePrefix'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSEksNodeGroup_basic\|TestAccAWSEksNodeGroup_Name_Generated\|TestAccAWSEksNodeGroup_NamePrefix -timeout 180m
=== RUN   TestAccAWSEksNodeGroup_basic
=== PAUSE TestAccAWSEksNodeGroup_basic
=== RUN   TestAccAWSEksNodeGroup_Name_Generated
=== PAUSE TestAccAWSEksNodeGroup_Name_Generated
=== RUN   TestAccAWSEksNodeGroup_NamePrefix
=== PAUSE TestAccAWSEksNodeGroup_NamePrefix
=== CONT  TestAccAWSEksNodeGroup_basic
=== CONT  TestAccAWSEksNodeGroup_NamePrefix
=== CONT  TestAccAWSEksNodeGroup_Name_Generated
--- PASS: TestAccAWSEksNodeGroup_basic (1047.30s)
--- PASS: TestAccAWSEksNodeGroup_NamePrefix (1133.09s)
--- PASS: TestAccAWSEksNodeGroup_Name_Generated (1245.67s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	1248.609s
GovCloud
%  make testacc TEST=./aws TESTARGS='-run=TestAccAWSEksNodeGroup_basic\|TestAccAWSEksNodeGroup_Name_Generated\|TestAccAWSEksNodeGroup_NamePrefix'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSEksNodeGroup_basic\|TestAccAWSEksNodeGroup_Name_Generated\|TestAccAWSEksNodeGroup_NamePrefix -timeout 180m
=== RUN   TestAccAWSEksNodeGroup_basic
=== PAUSE TestAccAWSEksNodeGroup_basic
=== RUN   TestAccAWSEksNodeGroup_Name_Generated
=== PAUSE TestAccAWSEksNodeGroup_Name_Generated
=== RUN   TestAccAWSEksNodeGroup_NamePrefix
=== PAUSE TestAccAWSEksNodeGroup_NamePrefix
=== CONT  TestAccAWSEksNodeGroup_basic
=== CONT  TestAccAWSEksNodeGroup_NamePrefix
=== CONT  TestAccAWSEksNodeGroup_Name_Generated
--- PASS: TestAccAWSEksNodeGroup_Name_Generated (969.59s)
--- PASS: TestAccAWSEksNodeGroup_basic (1030.53s)
--- PASS: TestAccAWSEksNodeGroup_NamePrefix (1085.43s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	1088.459s

@ewbankkit
Copy link
Contributor

@dstevensson Thanks for the contribution 👏.
In order to get this merged quicker I went ahead and modified the code a bit to meet our current conventions on resource name generation.
Other than that everything looks great.

@ewbankkit ewbankkit merged commit 28d5f40 into hashicorp:main May 12, 2021
@github-actions github-actions bot added this to the v3.40.0 milestone May 12, 2021
@ghost
Copy link

ghost commented May 13, 2021

This has been released in version 3.40.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 for triage. Thanks!

@dstevensson dstevensson deleted the f-aws_eks_node_group-prefix branch May 20, 2021 13:24
@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 20, 2021
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. service/eks Issues and PRs that pertain to the eks 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.

3 participants