Skip to content

Commit c64fae1

Browse files
authored
defined tags ignore changes (#37)
1 parent f756f24 commit c64fae1

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

instance_principal.tf

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@ resource "oci_identity_dynamic_group" "operator_instance_principal" {
1515
provider = oci.home
1616

1717
compartment_id = var.tenancy_id
18-
description = "dynamic group to allow instances to call services for 1 operator"
19-
18+
description = var.label_prefix == "none" ? "dynamic group to allow instances to call services for 1 operator" : "dynamic group with label ${var.label_prefix} to allow instances to call services for 1 operator"
19+
2020
lifecycle {
21-
ignore_changes = [name]
21+
ignore_changes = [name, defined_tags]
2222
}
2323

24-
matching_rule = "ALL {instance.id = '${join(",", data.oci_core_instance.operator.*.id)}'}"
25-
name = var.label_prefix == "none" ? "operator-instance-principal-${substr(uuid(),0,8)}" : "${var.label_prefix}-operator-instance-principal-${substr(uuid(),0,8)}"
24+
matching_rule = "ALL {instance.id = '${join(",", data.oci_core_instance.operator.*.id)}'}"
25+
name = "operator-instance-principal-${substr(uuid(), 0, 8)}"
2626

2727
count = var.create_operator == true && var.operator_instance_principal == true ? 1 : 0
2828
}

0 commit comments

Comments
 (0)