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 capacity_type argument and support multiple instance_types #16510

Merged
merged 1 commit into from
Dec 1, 2020

Conversation

bflad
Copy link
Contributor

@bflad bflad commented Dec 1, 2020

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 `capacity_type` argument and support multiple `instance_types`

Output from acceptance testing (failure unrelated):

--- PASS: TestAccAWSEksNodeGroup_disappears (1137.64s)
--- PASS: TestAccAWSEksNodeGroup_InstanceTypes_Single (1146.91s)
--- PASS: TestAccAWSEksNodeGroup_ScalingConfig_MaxSize (1158.65s)
--- PASS: TestAccAWSEksNodeGroup_ScalingConfig_MinSize (1169.90s)
--- PASS: TestAccAWSEksNodeGroup_CapacityType_Spot (1189.79s)
--- PASS: TestAccAWSEksNodeGroup_RemoteAccess_Ec2SshKey (1212.94s)
--- PASS: TestAccAWSEksNodeGroup_Labels (1252.51s)
--- FAIL: TestAccAWSEksNodeGroup_AmiType (1273.27s)
--- PASS: TestAccAWSEksNodeGroup_RemoteAccess_SourceSecurityGroupIds (1314.53s)
--- PASS: TestAccAWSEksNodeGroup_basic (1328.29s)
--- PASS: TestAccAWSEksNodeGroup_Tags (1334.23s)
--- PASS: TestAccAWSEksNodeGroup_DiskSize (1362.48s)
--- PASS: TestAccAWSEksNodeGroup_ScalingConfig_DesiredSize (1399.97s)
--- PASS: TestAccAWSEksNodeGroup_InstanceTypes_Multiple (1406.37s)
--- PASS: TestAccAWSEksNodeGroup_LaunchTemplate_Id (1769.34s)
--- PASS: TestAccAWSEksNodeGroup_LaunchTemplate_Name (1894.86s)
--- PASS: TestAccAWSEksNodeGroup_LaunchTemplate_Version (2031.79s)
--- PASS: TestAccAWSEksNodeGroup_ReleaseVersion (4389.64s)
--- PASS: TestAccAWSEksNodeGroup_Version (5102.97s)
--- PASS: TestAccAWSEksNodeGroup_ForceUpdateVersion (5206.07s)

…ultiple instance_types

Output from acceptance testing (see #16146 for unrelated failure triage on the main branch):

```
--- FAIL: TestAccAWSEksNodeGroup_LaunchTemplate_Version (2588.15s)
--- FAIL: TestAccAWSEksNodeGroup_ReleaseVersion (4116.90s)
--- PASS: TestAccAWSEksNodeGroup_AmiType (1739.66s)
--- PASS: TestAccAWSEksNodeGroup_basic (1263.54s)
--- PASS: TestAccAWSEksNodeGroup_CapacityType_Spot (1397.33s)
--- PASS: TestAccAWSEksNodeGroup_disappears (1359.08s)
--- PASS: TestAccAWSEksNodeGroup_DiskSize (1284.23s)
--- PASS: TestAccAWSEksNodeGroup_ForceUpdateVersion (5320.15s)
--- PASS: TestAccAWSEksNodeGroup_InstanceTypes_Multiple (1232.97s)
--- PASS: TestAccAWSEksNodeGroup_InstanceTypes_Single (1490.11s)
--- PASS: TestAccAWSEksNodeGroup_Labels (1268.53s)
--- PASS: TestAccAWSEksNodeGroup_LaunchTemplate_Id (1711.11s)
--- PASS: TestAccAWSEksNodeGroup_LaunchTemplate_Name (1661.18s)
--- PASS: TestAccAWSEksNodeGroup_RemoteAccess_Ec2SshKey (1292.95s)
--- PASS: TestAccAWSEksNodeGroup_RemoteAccess_SourceSecurityGroupIds (1306.54s)
--- PASS: TestAccAWSEksNodeGroup_ScalingConfig_DesiredSize (1189.50s)
--- PASS: TestAccAWSEksNodeGroup_ScalingConfig_MaxSize (1358.88s)
--- PASS: TestAccAWSEksNodeGroup_ScalingConfig_MinSize (1428.47s)
--- PASS: TestAccAWSEksNodeGroup_Tags (1366.22s)
--- PASS: TestAccAWSEksNodeGroup_Version (5252.66s)
```
@bflad bflad added the enhancement Requests to existing resources that expand the functionality or scope. label Dec 1, 2020
@bflad bflad added this to the v3.19.0 milestone Dec 1, 2020
@ghost ghost added size/L Managed by automation to categorize the size of a PR. service/eks Issues and PRs that pertain to the eks service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Dec 1, 2020
@bflad bflad marked this pull request as ready for review December 1, 2020 21:04
@bflad bflad requested a review from a team as a code owner December 1, 2020 21:04
Copy link
Contributor

@anGie44 anGie44 left a comment

Choose a reason for hiding this comment

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

LGTM 🎉

@bflad bflad merged commit 7cc0810 into master Dec 1, 2020
@bflad bflad deleted the f-eks-spot-node-groups branch December 1, 2020 22:05
bflad added a commit that referenced this pull request Dec 1, 2020
@ghost
Copy link

ghost commented Dec 1, 2020

This has been released in version 3.19.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!

@langesven
Copy link

does it happen by design that this forces a re-creation of the EKS node group even if I don't set the value at all?
it's setting the capacity_type to the same value that was already being used previously as on_demand was the default, so this should ideally be a no-op I'd assume..

  # module.kubernetes.module.eks.aws_eks_node_group.eks_node_group[0] must be replaced
-/+ resource "aws_eks_node_group" "eks_node_group" {
        ami_type        = "AL2_x86_64"
      ~ arn             = "arn:aws:eks:eu-central-1:1234567890:nodegroup/eks-cluster/eks-cluster/7ab8892c-4b62-72ae-09ac-00c8f8ed2c8f" -> (known after apply)
      + capacity_type   = "ON_DEMAND" # forces replacement
        cluster_name    = "eks-cluster"
        disk_size       = 100

even if I inject the capacity_type into the terraform state and push it it comes back and still wants to replace the node group for no good reason at all :)

@anGie44
Copy link
Contributor

anGie44 commented Dec 2, 2020

Hi @langesven, thanks for commenting here. Looks like we're tracking a similar issue here #16547 . In the example provided, are you upgrading from 3.18 to 3.19 as well? If the linked issue seems different from your use-case, do you mind creating a new issue with steps to reproduce/configuration details? We're also investigating if this could perhaps be region specific.

@ghost
Copy link

ghost commented Jan 1, 2021

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked as resolved and limited conversation to collaborators Jan 1, 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. service/eks Issues and PRs that pertain to the eks service. size/L 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