From 3fd0f7f54fd6a34991fd7d4d8ba4ea06de2b9dd8 Mon Sep 17 00:00:00 2001 From: wierdvanderhaar <103496090+wierdvanderhaar@users.noreply.github.com> Date: Wed, 27 Dec 2023 09:29:26 +0100 Subject: [PATCH] ignore-new-AMI-version (#105) This change prevents instances from being recreated because there is a newer version of the AMI. --------- Co-authored-by: Niklas Schmidtmer --- aws/ec2.tf | 2 +- aws/ec2_utility.tf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/aws/ec2.tf b/aws/ec2.tf index 3ec7f1b..c9d1891 100644 --- a/aws/ec2.tf +++ b/aws/ec2.tf @@ -181,7 +181,7 @@ resource "aws_instance" "cratedb_node" { } lifecycle { - ignore_changes = [user_data] + ignore_changes = [user_data, ami] } tags = { diff --git a/aws/ec2_utility.tf b/aws/ec2_utility.tf index 93d9fd1..96f2072 100644 --- a/aws/ec2_utility.tf +++ b/aws/ec2_utility.tf @@ -148,7 +148,7 @@ resource "aws_instance" "utilities" { } lifecycle { - ignore_changes = [user_data] + ignore_changes = [user_data, ami] } tags = {