terraform-aws-ec2-autoscale-group
terraform-aws-ec2-autoscale-group copied to clipboard
launch_template_version $Latest does not trigger instance refresh when user-data or launch_tempate is updated.
Describe the Bug
launch_template_version $Latest does not trigger instance refresh when user-data or launch_tempate is updated.
Expected Behavior
When launch_template is updated , the latest version should be picked up by Autoscaling group and it should trigger instance refresh
Steps to Reproduce
Steps to reproduce the behavior:
- Update the user-data or instance type or AMI
- run terraform apply
- it should show the launchtemplate update
- it updates the launch template but, does not trigger instance refresh
Environment (please complete the following information):
Anything that will help us triage the bug will help. Here are some ideas:
- OS: Amazon Linux2
With Terraform 1.2, I think we can fix this. We can have a structure like this:
resource "aws_lt" "this" {
...
}
data "aws_lt" "this" {
id = aws_lt.this.id
}
resource "aws_autoscale_group" "this" {
lt = data.aws_ld.this.version
}
Does this make sense? Any objections if I implement?