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

capacity_type introduced on aws_eks_node_group is forcing recreation in v3.19.0 #16547

Closed
samcday opened this issue Dec 2, 2020 · 5 comments · Fixed by #16552
Closed

capacity_type introduced on aws_eks_node_group is forcing recreation in v3.19.0 #16547

samcday opened this issue Dec 2, 2020 · 5 comments · Fixed by #16552
Labels
service/eks Issues and PRs that pertain to the eks service. upstream Addresses functionality related to the cloud provider.
Milestone

Comments

@samcday
Copy link

samcday commented Dec 2, 2020

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue 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 issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform CLI and Terraform AWS Provider

Terraform 0.12.x
AWS provider v3.19.0

Affected Resource(s)

  • aws_eks_node_group

Terraform Configuration Files

https://github.com/terraform-aws-modules/terraform-aws-eks/blob/master/modules/node_groups/node_groups.tf#L1

Plan Output

  # module.eks.module.node_groups.aws_eks_node_group.workers["node-group-3"] must be replaced
+/- resource "aws_eks_node_group" "workers" {
      ~ ami_type        = "AL2_x86_64" -> (known after apply)
      ~ arn             = "<REDACTED>" -> (known after apply)
      + capacity_type   = "ON_DEMAND" # forces replacement
        cluster_name    = "<REDACTED>"
        disk_size       = 120
        <SNIP>
    }

Expected Behavior

Upgrading to terraform-provider-aws v3.19.0, which is a minor semver change, should not cause existing aws_eks_node_group should not cause existing resources to be replaced.

Actual Behavior

Existing node groups are being forced to recreate.

Steps to Reproduce

  1. Deploy an aws_eks_node_group with terraform-provider-aws v3.18.0
  2. Update terraform-provider-aws to v3.19.0
  3. terraform plan

References

v3.18.0...v3.19.0#diff-fbadf1462da63413e1e824058fc520a1711c7a8c0ec3a27266fc51adb96e94c4R50

@ghost ghost added the service/eks Issues and PRs that pertain to the eks service. label Dec 2, 2020
@github-actions github-actions bot added the needs-triage Waiting for first response or review from a maintainer. label Dec 2, 2020
@anGie44 anGie44 added thinking and removed needs-triage Waiting for first response or review from a maintainer. labels Dec 2, 2020
@langesven
Copy link

@anGie44 replying here from the linked PR comment I made.

Yes we're also upgrading from using 3.18.0 to now 3.19.0
We're in eu-central-1 if that makes a difference, because you mentioned regions
If there's anything else I can supply that could help you let me know.
As mentioned modifying the state surprisingly did not convince terraform to not want to do the replacement even though the bit it wants to add was pushed into the state manually by me

@anGie44
Copy link
Contributor

anGie44 commented Dec 2, 2020

Hi @samcday @langesven , thank you for raising this issue. the team has reached out to the AWS EKS service team to confirm the API expectations for pre-existing node groups as it seems from the Terraform plan output the capacity_type field is not being returned and once we hear back, we'll comment back here with updates.

@anGie44 anGie44 added the upstream Addresses functionality related to the cloud provider. label Dec 2, 2020
@anGie44
Copy link
Contributor

anGie44 commented Dec 2, 2020

Hi all, we've been notified from the EKS service team the new field only applies to new node groups so we'll move forward with removing drift detection from that field unless explicitly configured.

@ghost
Copy link

ghost commented Dec 3, 2020

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

@ghost
Copy link

ghost commented Jan 2, 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 2, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
service/eks Issues and PRs that pertain to the eks service. upstream Addresses functionality related to the cloud provider.
Projects
None yet
3 participants