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

Error creating AutoScaling Group #29

Closed
TomAugspurger opened this issue May 8, 2020 · 3 comments
Closed

Error creating AutoScaling Group #29

TomAugspurger opened this issue May 8, 2020 · 3 comments

Comments

@TomAugspurger
Copy link
Member

Running terraform apply -var-file=aws-cluster.tfvars, I eventually hit

Error: Error creating AutoScaling Group: ValidationError: You must use a valid fully-formed launch template. You cannot use PartitionNumber with a Placement Group that does not exist. Specify a valid Placement Group and try again.
        status code: 400, request id: 01bd991d-e8ff-4bf9-af50-b5ec5d279950

  on .terraform/modules/eks/terraform-aws-eks-11.1.0/workers_launch_template.tf line 3, in resource "aws_autoscaling_group" "workers_launch_template":
   3: resource "aws_autoscaling_group" "workers_launch_template" {



Error: Error creating AutoScaling Group: ValidationError: You must use a valid fully-formed launch template. You cannot use PartitionNumber with a Placement Group that does not exist. Specify a valid Placement Group and try again.
        status code: 400, request id: 10d2f03d-820c-4f05-bca0-d16d9817470e

  on .terraform/modules/eks/terraform-aws-eks-11.1.0/workers_launch_template.tf line 3, in resource "aws_autoscaling_group" "workers_launch_template":
   3: resource "aws_autoscaling_group" "workers_launch_template" {

@salvis2 any guesses on why that would be? Any other info I should provide (first time using terraform).

@salvis2
Copy link
Member

salvis2 commented May 8, 2020

I haven't created an autoscaling group with the base Terraform resource. I'm using their EKS module and specifying worker groups from within there.

Looking in that module's local.tf and workers_launch_template.tf, it seems the default placement group it an empty string. I've never specified that variable, and I can't find it with terraform state [asg_resource].

Reading the aws_autoscaling_group docs, I see they specify a placement group resource in the first example, but not in the others. The placement_group variable is listed as optional.

Did you just run the Terraform command in the aws/ directory? What config did you use?

@TomAugspurger
Copy link
Member Author

The config is at https://github.com/pangeo-data/multicloud-demo/tree/master/aws/aws.

The command was

$ terraform apply -var-file=aws-cluster.tfvars  

I can keep poking at this.

I notice that the master branch has more .tf files in the aws/ directory. I based my setup off the blog branch. Could that be relevant?

@TomAugspurger
Copy link
Member Author

@salvis2 discovered the issue: a recent update to the aws module: terraform-aws-modules/terraform-aws-eks#874 (comment)

That's been fixed, but pinning to 2.59.0 for now worked.

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