File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed
Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,11 @@ resource "oci_core_instance" "admin" {
2020 subnet_id = oci_core_subnet.admin[0 ].id
2121 }
2222
23+ # prevent the bastion from destroying and recreating itself if the image ocid changes
24+ lifecycle {
25+ ignore_changes = [source_details [0 ]. source_id ]
26+ }
27+
2328 shape = var. oci_admin . admin_shape
2429
2530 source_details {
Original file line number Diff line number Diff line change @@ -20,6 +20,11 @@ resource "oci_core_instance" "bastion" {
2020 user_data = data.template_cloudinit_config.bastion[0 ].rendered
2121 }
2222
23+ # prevent the bastion from destroying and recreating itself if the image ocid changes
24+ lifecycle {
25+ ignore_changes = [source_details [0 ]. source_id ]
26+ }
27+
2328 shape = var. oci_bastion . bastion_shape
2429
2530 source_details {
@@ -32,4 +37,4 @@ resource "oci_core_instance" "bastion" {
3237 }
3338
3439 count = var. oci_bastion . bastion_enabled == true ? 1 : 0
35- }
40+ }
You can’t perform that action at this time.
0 commit comments