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_node_group: change instance_types back to a TypeSet since it supports multiple values #20532

Merged
merged 1 commit into from
Aug 12, 2021

Conversation

anGie44
Copy link
Contributor

@anGie44 anGie44 commented Aug 12, 2021

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

Notes

  • originally the instance_types argument was limited to only 1 value so it was defined as a TypeList+MaxItems: 1 from a TypeSet to adhere to our linter rules but later support for multiple values was added , leaving the argument as only a TypeList which can on occasion lead to non-empty plans depending on the order returned from the API. To account for this, we can change the argument back to a TypeSet since order does not matter.

Relates #13340 , #16510

Output from acceptance testing before change:

=== CONT  TestAccAWSEksNodeGroup_InstanceTypes_Multiple
    resource_aws_eks_node_group_test.go:351: Step 1/2 error: After applying this test step, the plan was not empty.
        stdout:
        
        
        An execution plan has been generated and is shown below.
        Resource actions are indicated with the following symbols:
        -/+ destroy and then create replacement
        
        Terraform will perform the following actions:
        
          # aws_eks_node_group.test must be replaced
        -/+ resource "aws_eks_node_group" "test" {
              ~ ami_type               = "AL2_x86_64" -> (known after apply)
              ~ arn                    = "arn:aws:eks:us-west-2:*******:nodegroup/tf-acc-test-6142434190859222803/tf-acc-test-6142434190859222803/26bd9b34-6b1b-541c-8c07-ffda3b4c27b5" -> (known after apply)
              ~ capacity_type          = "ON_DEMAND" -> (known after apply)
              ~ disk_size              = 20 -> (known after apply)
              ~ id                     = "tf-acc-test-6142434190859222803:tf-acc-test-6142434190859222803" -> (known after apply)
              ~ instance_types         = [
                  - "t3.large",
                  + "t2.medium",
                    "t2.large",
                  + "t3.large",
                    "t3.medium",
                  - "t2.medium",
                ]
              + node_group_name_prefix = (known after apply)
              ~ release_version        = "1.20.4-20210722" -> (known after apply)
              ~ resources              = [
                  - {
                      - autoscaling_groups              = [
                          - {
                              - name = "eks-26bd9b34-6b1b-541c-8c07-ffda3b4c27b5"
                            },
                        ]
                      - remote_access_security_group_id = ""
                    },
                ] -> (known after apply)
              ~ status                 = "ACTIVE" -> (known after apply)
              ~ tags_all               = {} -> (known after apply)
              ~ version                = "1.20" -> (known after apply)
                # (4 unchanged attributes hidden)
        
                # (1 unchanged block hidden)
            }
        
        Plan: 1 to add, 0 to change, 1 to destroy.
--- FAIL: TestAccAWSEksNodeGroup_InstanceTypes_Multiple (1436.72s)

Output from acceptance testing after change:

--- PASS: TestAccAWSEksNodeGroup_InstanceTypes_Single (1109.58s)
--- PASS: TestAccAWSEksNodeGroup_InstanceTypes_Multiple (1232.87s)

@github-actions github-actions bot added documentation Introduces or discusses updates to documentation. service/eks Issues and PRs that pertain to the eks service. size/XS Managed by automation to categorize the size of a PR. and removed documentation Introduces or discusses updates to documentation. service/eks Issues and PRs that pertain to the eks service. labels Aug 12, 2021
@anGie44 anGie44 marked this pull request as ready for review August 12, 2021 15:19
@ewbankkit ewbankkit self-assigned this Aug 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 TESTARGS='-run=TestAccAWSEksNodeGroup_InstanceTypes_Single\|TestAccAWSEksNodeGroup_InstanceTypes_Multiple'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSEksNodeGroup_InstanceTypes_Single\|TestAccAWSEksNodeGroup_InstanceTypes_Multiple -timeout 180m
=== RUN   TestAccAWSEksNodeGroup_InstanceTypes_Multiple
=== PAUSE TestAccAWSEksNodeGroup_InstanceTypes_Multiple
=== RUN   TestAccAWSEksNodeGroup_InstanceTypes_Single
=== PAUSE TestAccAWSEksNodeGroup_InstanceTypes_Single
=== CONT  TestAccAWSEksNodeGroup_InstanceTypes_Multiple
=== CONT  TestAccAWSEksNodeGroup_InstanceTypes_Single
--- PASS: TestAccAWSEksNodeGroup_InstanceTypes_Multiple (1153.01s)
--- PASS: TestAccAWSEksNodeGroup_InstanceTypes_Single (1174.42s)
PASS
ok      github.com/terraform-providers/terraform-provider-aws/aws       1179.999s
GovCloud
% make testacc TESTARGS='-run=TestAccAWSEksNodeGroup_InstanceTypes_Single\|TestAccAWSEksNodeGroup_InstanceTypes_Multiple'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSEksNodeGroup_InstanceTypes_Single\|TestAccAWSEksNodeGroup_InstanceTypes_Multiple -timeout 180m
=== RUN   TestAccAWSEksNodeGroup_InstanceTypes_Multiple
=== PAUSE TestAccAWSEksNodeGroup_InstanceTypes_Multiple
=== RUN   TestAccAWSEksNodeGroup_InstanceTypes_Single
=== PAUSE TestAccAWSEksNodeGroup_InstanceTypes_Single
=== CONT  TestAccAWSEksNodeGroup_InstanceTypes_Multiple
=== CONT  TestAccAWSEksNodeGroup_InstanceTypes_Single
--- PASS: TestAccAWSEksNodeGroup_InstanceTypes_Single (959.83s)
--- PASS: TestAccAWSEksNodeGroup_InstanceTypes_Multiple (977.11s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	980.720s

@ewbankkit ewbankkit removed their assignment Aug 12, 2021
@anGie44 anGie44 added this to the v3.54.0 milestone Aug 12, 2021
@anGie44 anGie44 added the enhancement Requests to existing resources that expand the functionality or scope. label Aug 12, 2021
@anGie44 anGie44 merged commit 034c828 into main Aug 12, 2021
@anGie44 anGie44 deleted the b-eks-node-group-instance-types branch August 12, 2021 18:26
@github-actions
Copy link

This functionality has been released in v3.54.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 Sep 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Requests to existing resources that expand the functionality or scope. size/XS Managed by automation to categorize the size of a PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants