From 96cecbf719b3ba38b968113f299c9fe07c9a43fb Mon Sep 17 00:00:00 2001 From: Chandan Abhyankar Date: Mon, 17 Jun 2024 03:25:35 -0700 Subject: [PATCH] OPENSHIFTP-25: Changes are made to support incerease/decrease of worker count Signed-off-by: Chandan Abhyankar --- modules/2_pvs_prepare/bastion/bastion.tf | 4 +++- modules/5_worker/worker.tf | 2 +- modules/6_post/post.tf | 3 +++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/modules/2_pvs_prepare/bastion/bastion.tf b/modules/2_pvs_prepare/bastion/bastion.tf index ceb4f29..382c44f 100644 --- a/modules/2_pvs_prepare/bastion/bastion.tf +++ b/modules/2_pvs_prepare/bastion/bastion.tf @@ -27,6 +27,8 @@ resource "ibm_pi_instance" "bastion" { pi_network { network_id = var.powervs_network_id } + + lifecycle { ignore_changes = all } } # Dev Note: injects a delay before a hard-reboot @@ -359,4 +361,4 @@ done EOF ] } -} \ No newline at end of file +} diff --git a/modules/5_worker/worker.tf b/modules/5_worker/worker.tf index a0784c0..aeeb97a 100644 --- a/modules/5_worker/worker.tf +++ b/modules/5_worker/worker.tf @@ -40,5 +40,5 @@ resource "ibm_pi_instance" "worker" { name : base64encode("${var.name_prefix}-worker-${count.index}"), })) - lifecycle { ignore_changes = [pi_user_data] } + lifecycle { ignore_changes = all } } diff --git a/modules/6_post/post.tf b/modules/6_post/post.tf index 3d0e5f7..be64251 100644 --- a/modules/6_post/post.tf +++ b/modules/6_post/post.tf @@ -74,6 +74,9 @@ bash files/destroy-workers.sh "${self.triggers.vpc_support_server_ip}" "${self.t EOF ] } + + lifecycle { ignore_changes = all } + } #command to run ansible playbook on Bastion