terraform-aws-modules / terraform-aws-autoscaling

Terraform module to create AWS Auto Scaling resources 🇺🇦
https://registry.terraform.io/modules/terraform-aws-modules/autoscaling/aws
Apache License 2.0
292 stars 558 forks source link

Getting error when trying to use existing launch template #227

Closed tkumark closed 1 year ago

tkumark commented 1 year ago

When trying to create an asg I have mentioned the name of the launch template but when I run terraform apply it give me error ValidationError: Valid requests must contain either launchTemplateId or LaunchTemplateName

module "asg" {
  source  = "terraform-aws-modules/autoscaling/aws"

  name = "sample-asg"
  min_size                  = 0
  max_size                  = 1
  desired_capacity          = 1
  vpc_zone_identifier       = ["subnet-0dd2456","subnet-db2f56ad"]
  create_launch_template    = false
  launch_template_name        = "sample-cluster"
  launch_template_version   = "1"
}
shaul75 commented 1 year ago

According to the documentation

launch_template_name Name of launch template to be created launch_template Name of an existing launch template to be used (created outside of this module)

github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale because it has been open 30 days with no activity. Remove stale label or comment or this issue will be closed in 10 days

github-actions[bot] commented 1 year ago

This issue was automatically closed because of stale in 10 days

github-actions[bot] commented 1 year ago

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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.