From 3e39e59512145415a264f8d9f58c5eee6468d035 Mon Sep 17 00:00:00 2001 From: Maciej Matysiak <103054339+mmgovuk@users.noreply.github.com> Date: Wed, 9 Aug 2023 14:47:27 +0100 Subject: [PATCH] CC-1993: Added user_data, user_data_replace_on_change to the ignore_changes block. --- terraform/environments/ccms-ebs/ccms-ec2-clamav.tf | 7 ++++++- terraform/environments/ccms-ebs/ccms-ec2-ftp.tf | 7 ++++++- terraform/environments/ccms-ebs/ccms-ec2-mailrelay.tf | 9 +++++++-- .../environments/ccms-ebs/ccms-ec2-oracle_accessgate.tf | 6 ++++-- terraform/environments/ccms-ebs/ccms-ec2-oracle_ebs.tf | 8 +++++++- .../environments/ccms-ebs/ccms-ec2-oracle_ebs_apps.tf | 6 +++++- .../ccms-ebs/ccms-ec2-oracle_ebs_dr_testing.tf | 8 +++++++- .../environments/ccms-ebs/ccms-ec2-oracle_webgate.tf | 4 +++- 8 files changed, 45 insertions(+), 10 deletions(-) diff --git a/terraform/environments/ccms-ebs/ccms-ec2-clamav.tf b/terraform/environments/ccms-ebs/ccms-ec2-clamav.tf index 0608c2dc631..44cfc5118db 100644 --- a/terraform/environments/ccms-ebs/ccms-ec2-clamav.tf +++ b/terraform/environments/ccms-ebs/ccms-ec2-clamav.tf @@ -13,7 +13,12 @@ resource "aws_instance" "ec2_clamav" { # Due to a bug in terraform wanting to rebuild the ec2 if more than 1 ebs block is attached, we need the lifecycle clause below lifecycle { - ignore_changes = [ebs_block_device, root_block_device] + ignore_changes = [ + ebs_block_device, + root_block_device, + user_data, + user_data_replace_on_change + ] } user_data_replace_on_change = false user_data = <