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

aws_eks_node_group can't set min_size of 0 #13984

Closed
nairb774 opened this issue Jun 29, 2020 · 2 comments
Closed

aws_eks_node_group can't set min_size of 0 #13984

nairb774 opened this issue Jun 29, 2020 · 2 comments
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/eks Issues and PRs that pertain to the eks service. upstream Addresses functionality related to the cloud provider.

Comments

@nairb774
Copy link

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 Version

$ terraform -v
Terraform v0.12.26
+ provider.aws v2.68.0
+ provider.template v2.1.2

Affected Resource(s)

  • aws_eks_node_group

Terraform Configuration Files

resource "aws_eks_node_group" "eks_node_group" {
  cluster_name    = locals.eks_cluster_name
  node_group_name = locals.eks_node_group_name
  node_role_arn   = locals.eks_worker_role_arn
  instance_types  = [locals.eks_instance_type]
  subnet_ids      = [locals.eks_subnet_id]

  scaling_config {
    desired_size = 0
    min_size = 0
    max_size = 50
  }

  lifecycle {
    ignore_changes = [
      scaling_config[0].desired_size,
    ]
  }
}

Error Output

Error: expected scaling_config.0.min_size to be at least (1), got 0

  on eks-cluster.tf line 1, in resource "aws_eks_node_group" "eks_node_group":
  1: resource "aws_eks_node_group" "eks_node_group" {



Error: expected scaling_config.0.desired_size to be at least (1), got 0

  on eks-cluster.tf line 1, in resource "aws_eks_node_group" "eks_node_group":
  1: resource "aws_eks_node_group" "eks_node_group" {

Expected Behavior

Be able to create the managed node group with a min size, and initial size of 0. The Cluster Autoscaler is able to scale up Node Groups/ASGs with a size of 0, but it is not possible to create such node groups. Ideally, the provider should not validate things that are left unspecified in AWS documentation (see references).

Actual Behavior

Steps to Reproduce

  1. terraform apply

The above errors are produced.

Important Factoids

References

@ghost ghost added the service/eks Issues and PRs that pertain to the eks service. label Jun 29, 2020
@github-actions github-actions bot added the needs-triage Waiting for first response or review from a maintainer. label Jun 29, 2020
@bflad bflad added enhancement Requests to existing resources that expand the functionality or scope. upstream Addresses functionality related to the cloud provider. and removed needs-triage Waiting for first response or review from a maintainer. labels Jun 29, 2020
@bflad
Copy link
Contributor

bflad commented Jun 29, 2020

Hi @nairb774 👋 Thank you for submitting this.

The minimum value of 1 is currently enforced by the EKS API and the Terraform AWS Provider is just validating that same limitation. It appears there is an upstream EKS roadmap issue for this available here: aws/containers-roadmap#724

Since the API does not support this currently, I'm going to close this for now since it is inactionable in this codebase, but if they do implement this support in the API we can re-evaluate when that time comes. In the meantime, I would suggest subscribing to and upvoting that roadmap issue or contacting AWS Support with a feature request case. Thanks again.

@ghost
Copy link

ghost commented Jul 30, 2020

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 and limited conversation to collaborators Jul 30, 2020
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. upstream Addresses functionality related to the cloud provider.
Projects
None yet
Development

No branches or pull requests

2 participants