Closed vishwa-trulioo closed 2 years ago
you'll need to add the variable launch_template_version
since the template is managed externally from the module
Ref: https://github.com/terraform-aws-modules/terraform-aws-autoscaling/blob/master/main.tf#L235-L239
I used launch_template
and launch_template_version
both together. Still it gives the same errors. It keeps looking for previous instance template ID.
Another note is.... If I recreate it the AG with the new instance template in place, then it works fine. I run in to this issue only when I change the instance template of an existing ASG (without recreating)
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
This issue was automatically closed because of stale in 10 days
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.
Description
I am trying to use this module to create an ASG using an already existing launch template. As part of my requirement I want to be able to change the instance template of the ASG. I attempted it it using the below paramters.
Then, I changed the value of
launch_template
to a different launch template. Terraform fails complaining that it can't find the template ID.Versions
Reproduction
Steps to reproduce the behavior:
Code Snippet to Reproduce
I used the official example with the following as the module code...
Expected behavior
Actual behavior
Generates the following error.
Terminal Output Screenshot(s)
Additional context
Here is my observation...... When I change the value of the
launch_template
in the module, Terraform doesn't automatically go an fetch the template ID of new template and use that along with the launch_template name. Instead it uses the old template ID with the new launch_template name. If it is possible to add support to specify the launch template ID and/or launch_template name, then this would be fixed.