Invalid Terraform Syntax For ASG Launch Template 'version' Field
michaelprice232 opened this issue · comments
I've recently encountered the following errors when provisioning this module into our AWS account:
Error: Error creating AutoScaling Group: ValidationError: Invalid launch template version: either '$Default', '$Latest', or a numeric version are allowed.
status code: 400, request id: 91aedde0-b2e2-11e9-a1aa-af17fe228806
on ../terraform-aws-concourse/asg.tf line 44, in resource "aws_autoscaling_group" "web_asg":
44: resource "aws_autoscaling_group" "web_asg" {
Error: Error creating AutoScaling Group: ValidationError: Invalid launch template version: either '$Default', '$Latest', or a numeric version are allowed.
status code: 400, request id: 91af04b7-b2e2-11e9-8042-cf7640053d0d
on ../terraform-aws-concourse/asg.tf line 120, in resource "aws_autoscaling_group" "worker_asg":
120: resource "aws_autoscaling_group" "worker_asg" {
I have tried using terraform version 0.12.4
and 0.12.5
although get the same results (I can see the required version in the module set to >=0.12.3
). I am using version 1.0.0
of the module.
It looks like the Terraform syntax is incorrect for the web & worker ASG's launch template config:
https://github.com/7Factor/terraform-aws-concourse/blob/v1.0.0/asg.tf#L55
https://github.com/7Factor/terraform-aws-concourse/blob/v1.0.0/asg.tf#L129
According to the TF docs the value should be $Latest
instead of $$Latest
:
https://www.terraform.io/docs/providers/aws/r/autoscaling_group.html#launch_template-1
Happy to raise a PR you agree
Thanks for raising this issue, it has been updated on master :)