Skip to content

Unexpected destroy and recreate in XAZ and possibly more #66

Description

@rivergarden

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.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions