I have an XAZ module in a CI/CD pipeline. afyter pushing some networking changes, the plan showed the XAZ instances would be destroyed due to:
~ launch_template {
id = "[...snip...]"
~ name = "[...snip...]" -> (known after apply)
~ version = "1" -> "$Latest" # forces replacement
}
A live gateway must not be destroyed / recreated because (likely reason) a new AMI was released. The rebuild time for this XAZ would be a few hours, as there are several multi-vip configurations to handle (local dynamic objects) as well as monitoring, SSH hardening, etc.
An AI agent recommended adding image_id to the lifecycle block in each launch template. This did not work.
It also suggested adding launch_template to each instance config lifecycle block.
These two together worked, but maybe the first one is not required. I was not able to test.
Please review and modify the repo - plus check in management, MDS, standalone, and same-az cluster that they are also not affected. (ASG's are by design going to take the latest AMI which is good.)
I have an XAZ module in a CI/CD pipeline. afyter pushing some networking changes, the plan showed the XAZ instances would be destroyed due to:
A live gateway must not be destroyed / recreated because (likely reason) a new AMI was released. The rebuild time for this XAZ would be a few hours, as there are several multi-vip configurations to handle (local dynamic objects) as well as monitoring, SSH hardening, etc.
An AI agent recommended adding image_id to the lifecycle block in each launch template. This did not work.
It also suggested adding launch_template to each instance config lifecycle block.
These two together worked, but maybe the first one is not required. I was not able to test.
Please review and modify the repo - plus check in management, MDS, standalone, and same-az cluster that they are also not affected. (ASG's are by design going to take the latest AMI which is good.)