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

Recommended SSM Parameter Out of Date #559

Closed
bflad opened this issue Nov 11, 2020 · 6 comments
Closed

Recommended SSM Parameter Out of Date #559

bflad opened this issue Nov 11, 2020 · 6 comments

Comments

@bflad
Copy link

bflad commented Nov 11, 2020

What happened:

Currently, the recommended release version parameter (at least for 1.16) is out of date with what the EKS API accepts:

$ aws ssm get-parameter --name /aws/service/eks/optimized-ami/1.16/amazon-linux-2/recommended/release_version
{
    "Parameter": {
        "Name": "/aws/service/eks/optimized-ami/1.16/amazon-linux-2/recommended/release_version",
        "Type": "String",
        "Value": "1.16.13-20201007",
        "Version": 15,
        "LastModifiedDate": "2020-10-09T16:24:21.116000-04:00",
        "ARN": "arn:aws:ssm:us-west-2::parameter/aws/service/eks/optimized-ami/1.16/amazon-linux-2/recommended/release_version",
        "DataType": "text"
    }
}
InvalidParameterException: Requested Nodegroup release version 1.16.13-20201007 is invalid. Allowed release version is 1.16.15-20201107
{
RespMetadata: {
StatusCode: 400,
RequestID: "17a52d81-285a-4e03-924c-874d3d895e3b"
},

What you expected to happen:

Available SSM Parameter to always return a valid release version.

How to reproduce it (as minimally and precisely as possible):

Example snippet of Terraform configuration (only relevant piece is release_version argument and its value):

data "aws_ssm_parameter" "test" {
  name = "/aws/service/eks/optimized-ami/1.16/amazon-linux-2/recommended/release_version"
}

resource "aws_eks_node_group" "test" {
  cluster_name    = aws_eks_cluster.test.name
  node_group_name = "test"
  node_role_arn   = aws_iam_role.node.arn
  release_version = data.aws_ssm_parameter.test.value
  subnet_ids      = aws_subnet.test[*].id
  version         = aws_eks_cluster.test.version

  scaling_config {
    desired_size = 1
    max_size     = 1
    min_size     = 1
  }
}

Anything else we need to know?:

Environment:

  • AWS Region: us-west-2
bflad added a commit to hashicorp/terraform-provider-aws that referenced this issue Nov 12, 2020
Reference: #16146
Reference: aws/containers-roadmap#771
Reference: awslabs/amazon-eks-ami#559

Previously:

```
=== CONT  TestAccAWSEksNodeGroup_LaunchTemplate_Version
TestAccAWSEksNodeGroup_LaunchTemplate_Version: resource_aws_eks_node_group_test.go:394: Step 3/3, expected an error but got none
--- FAIL: TestAccAWSEksNodeGroup_LaunchTemplate_Version (2495.73s)

=== CONT  TestAccAWSEksNodeGroup_ReleaseVersion
TestAccAWSEksNodeGroup_ReleaseVersion: resource_aws_eks_node_group_test.go:433: Step 3/3 error: Error running apply: 2020/11/11 10:20:03 [DEBUG] Using modified User-Agent: Terraform/0.12.29 HashiCorp-terraform-exec/0.10.0
Error: error updating EKS Node Group (tf-acc-test-7656789780485850868:tf-acc-test-7656789780485850868) version: InvalidParameterException: Requested Nodegroup release version 1.16.13-20201007 is invalid. Allowed release version is 1.16.15-20201107
{
RespMetadata: {
StatusCode: 400,
RequestID: "17a52d81-285a-4e03-924c-874d3d895e3b"
},
ClusterName: "tf-acc-test-7656789780485850868",
Message_: "Requested Nodegroup release version 1.16.13-20201007 is invalid. Allowed release version is 1.16.15-20201107",
NodegroupName: "tf-acc-test-7656789780485850868"
}
--- FAIL: TestAccAWSEksNodeGroup_ReleaseVersion (4466.46s)
```

Output from acceptance testing:

```
--- PASS: TestAccAWSEksNodeGroup_LaunchTemplate_Version (2424.12s)
--- PASS: TestAccAWSEksNodeGroup_ReleaseVersion (4059.77s)
```
bflad added a commit to hashicorp/terraform-provider-aws that referenced this issue Nov 12, 2020
Reference: #16146
Reference: aws/containers-roadmap#771
Reference: awslabs/amazon-eks-ami#559

Previously:

```
=== CONT  TestAccAWSEksNodeGroup_LaunchTemplate_Version
TestAccAWSEksNodeGroup_LaunchTemplate_Version: resource_aws_eks_node_group_test.go:394: Step 3/3, expected an error but got none
--- FAIL: TestAccAWSEksNodeGroup_LaunchTemplate_Version (2495.73s)

=== CONT  TestAccAWSEksNodeGroup_ReleaseVersion
TestAccAWSEksNodeGroup_ReleaseVersion: resource_aws_eks_node_group_test.go:433: Step 3/3 error: Error running apply: 2020/11/11 10:20:03 [DEBUG] Using modified User-Agent: Terraform/0.12.29 HashiCorp-terraform-exec/0.10.0
Error: error updating EKS Node Group (tf-acc-test-7656789780485850868:tf-acc-test-7656789780485850868) version: InvalidParameterException: Requested Nodegroup release version 1.16.13-20201007 is invalid. Allowed release version is 1.16.15-20201107
{
RespMetadata: {
StatusCode: 400,
RequestID: "17a52d81-285a-4e03-924c-874d3d895e3b"
},
ClusterName: "tf-acc-test-7656789780485850868",
Message_: "Requested Nodegroup release version 1.16.13-20201007 is invalid. Allowed release version is 1.16.15-20201107",
NodegroupName: "tf-acc-test-7656789780485850868"
}
--- FAIL: TestAccAWSEksNodeGroup_ReleaseVersion (4466.46s)
```

Output from acceptance testing:

```
--- PASS: TestAccAWSEksNodeGroup_LaunchTemplate_Version (2424.12s)
--- PASS: TestAccAWSEksNodeGroup_ReleaseVersion (4059.77s)
```
@rtripat
Copy link
Contributor

rtripat commented Nov 20, 2020

Can you retry this now?

@bflad
Copy link
Author

bflad commented Dec 10, 2020

Hi @rtripat this is still occurring with newer versions:

$ aws ssm get-parameter --name /aws/service/eks/optimized-ami/1.18/amazon-linux-2/recommended/release_version
{
    "Parameter": {
        "Name": "/aws/service/eks/optimized-ami/1.18/amazon-linux-2/recommended/release_version",
        "Type": "String",
        "Value": "1.18.9-20201126",
        "Version": 5,
        "LastModifiedDate": "2020-11-30T16:11:41.600000-05:00",
        "ARN": "arn:aws:ssm:us-west-2::parameter/aws/service/eks/optimized-ami/1.18/amazon-linux-2/recommended/release_version",
        "DataType": "text"
    }
}
InvalidParameterException: Requested Nodegroup release version 1.18.9-20201126 is invalid. Allowed release version is 1.18.9-20201207
{
RespMetadata: {
StatusCode: 400,
RequestID: "7307c311-9006-4346-9851-7bd23cd41974"
},
ClusterName: "tf-acc-test-2065180901557413293",
Message_: "Requested Nodegroup release version 1.18.9-20201126 is invalid. Allowed release version is 1.18.9-20201207",
NodegroupName: "tf-acc-test-2065180901557413293"
}

@rtripat
Copy link
Contributor

rtripat commented Dec 10, 2020

aws ssm get-parameter --name /aws/service/eks/optimized-ami/1.18/amazon-linux-2/recommended/release_version

Taking a look. Can you provide details on how you are creating the Nodegroup? CLI command, eksctl or Console?

@rtripat
Copy link
Contributor

rtripat commented Dec 10, 2020

@bflad I see that you are in Hashicorp which is an EKS partner. You have access to pre-released AMI versions.

20201207 is an AMI staged for release in production and can only be used by partners (for testing of features) and our internal test infrastructure. Can you try to create the nodegroup without specifying the release version at all? If you have further questions, feel free to reach out to AWS via support.

@bflad
Copy link
Author

bflad commented Dec 10, 2020

This is end-to-end testing for the Terraform AWS Provider aws_eks_node_group resource on behalf of all AWS customers:

I'll create a support request, but we will want to know a correct way for this type of account with access to staged AMIs to fetch an acceptable release version and create/update an EKS Node Group.

Support Case: 7719778681

@bflad
Copy link
Author

bflad commented Dec 14, 2020

Resolved out of band, thank you so much, @rtripat 👍

@bflad bflad closed this as completed Dec 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants