@@ -10,7 +10,7 @@ locals {
10
10
description = v1 . description
11
11
parent_ocid = v1 . parent_ocid != null ? v1 . parent_ocid : var . compartments_configuration . default_parent_ocid != null ? var . compartments_configuration . default_parent_ocid : var . tenancy_ocid
12
12
defined_tags = v1 . defined_tags != null ? v1 . defined_tags : var . compartments_configuration . default_defined_tags != null ? var . compartments_configuration . default_defined_tags : null
13
- freeform_tags = v1 . freeform_tags != null ? v1 . freeform_tags : var . compartments_configuration . default_freeform_tags ? var . compartments_configuration . default_freeform_tags : null
13
+ freeform_tags = v1 . freeform_tags != null ? v1 . freeform_tags : var . compartments_configuration . default_freeform_tags != null ? var . compartments_configuration . default_freeform_tags : null
14
14
tag_defaults = v1 . tag_defaults
15
15
enable_delete = var . compartments_configuration . enable_delete != null ? var . compartments_configuration . enable_delete : false
16
16
}
@@ -24,7 +24,7 @@ locals {
24
24
description = v2 . description
25
25
parent_ocid = oci_identity_compartment . these [k1 ]. id
26
26
defined_tags = v2 . defined_tags != null ? v2 . defined_tags : var . compartments_configuration . default_defined_tags != null ? var . compartments_configuration . default_defined_tags : null
27
- freeform_tags = v2 . freeform_tags != null ? v2 . freeform_tags : var . compartments_configuration . default_freeform_tags ? var . compartments_configuration . default_freeform_tags : null
27
+ freeform_tags = v2 . freeform_tags != null ? v2 . freeform_tags : var . compartments_configuration . default_freeform_tags != null ? var . compartments_configuration . default_freeform_tags : null
28
28
tag_defaults = v2 . tag_defaults
29
29
enable_delete = var . compartments_configuration . enable_delete != null ? var . compartments_configuration . enable_delete : false
30
30
}
@@ -40,7 +40,7 @@ locals {
40
40
description = v3 . description
41
41
parent_ocid = oci_identity_compartment . level_2 [k2 ]. id
42
42
defined_tags = v3 . defined_tags != null ? v3 . defined_tags : var . compartments_configuration . default_defined_tags != null ? var . compartments_configuration . default_defined_tags : null
43
- freeform_tags = v3 . freeform_tags != null ? v3 . freeform_tags : var . compartments_configuration . default_freeform_tags ? var . compartments_configuration . default_freeform_tags : null
43
+ freeform_tags = v3 . freeform_tags != null ? v3 . freeform_tags : var . compartments_configuration . default_freeform_tags != null ? var . compartments_configuration . default_freeform_tags : null
44
44
tag_defaults = v3 . tag_defaults
45
45
enable_delete = var . compartments_configuration . enable_delete != null ? var . compartments_configuration . enable_delete : false
46
46
}
@@ -58,7 +58,7 @@ locals {
58
58
description = v4 . description
59
59
parent_ocid = oci_identity_compartment . level_3 [k3 ]. id
60
60
defined_tags = v4 . defined_tags != null ? v4 . defined_tags : var . compartments_configuration . default_defined_tags != null ? var . compartments_configuration . default_defined_tags : null
61
- freeform_tags = v4 . freeform_tags != null ? v4 . freeform_tags : var . compartments_configuration . default_freeform_tags ? var . compartments_configuration . default_freeform_tags : null
61
+ freeform_tags = v4 . freeform_tags != null ? v4 . freeform_tags : var . compartments_configuration . default_freeform_tags != null ? var . compartments_configuration . default_freeform_tags : null
62
62
tag_defaults = v4 . tag_defaults
63
63
enable_delete = var . compartments_configuration . enable_delete != null ? var . compartments_configuration . enable_delete : false
64
64
}
@@ -78,7 +78,7 @@ locals {
78
78
description = v5 . description
79
79
parent_ocid = oci_identity_compartment . level_4 [k4 ]. id
80
80
defined_tags = v5 . defined_tags != null ? v5 . defined_tags : var . compartments_configuration . default_defined_tags != null ? var . compartments_configuration . default_defined_tags : null
81
- freeform_tags = v5 . freeform_tags != null ? v5 . freeform_tags : var . compartments_configuration . default_freeform_tags ? var . compartments_configuration . default_freeform_tags : null
81
+ freeform_tags = v5 . freeform_tags != null ? v5 . freeform_tags : var . compartments_configuration . default_freeform_tags != null ? var . compartments_configuration . default_freeform_tags : null
82
82
tag_defaults = v5 . tag_defaults
83
83
enable_delete = var . compartments_configuration . enable_delete != null ? var . compartments_configuration . enable_delete : false
84
84
}
@@ -100,7 +100,7 @@ locals {
100
100
description = v6 . description
101
101
parent_ocid = oci_identity_compartment . level_5 [k5 ]. id
102
102
defined_tags = v6 . defined_tags != null ? v6 . defined_tags : var . compartments_configuration . default_defined_tags != null ? var . compartments_configuration . default_defined_tags : null
103
- freeform_tags = v6 . freeform_tags != null ? v6 . freeform_tags : var . compartments_configuration . default_freeform_tags ? var . compartments_configuration . default_freeform_tags : null
103
+ freeform_tags = v6 . freeform_tags != null ? v6 . freeform_tags : var . compartments_configuration . default_freeform_tags != null ? var . compartments_configuration . default_freeform_tags : null
104
104
tag_defaults = v6 . tag_defaults
105
105
enable_delete = var . compartments_configuration . enable_delete != null ? var . compartments_configuration . enable_delete : false
106
106
}
@@ -140,7 +140,7 @@ resource "oci_identity_compartment" "these" {
140
140
description = each. value . description
141
141
enable_delete = each. value . enable_delete
142
142
defined_tags = each. value . defined_tags
143
- freeform_tags = each. value . freeform_tags
143
+ freeform_tags = merge (local . cislz_module_tag , each. value . freeform_tags )
144
144
}
145
145
146
146
resource "oci_identity_compartment" "level_2" {
@@ -155,7 +155,7 @@ resource "oci_identity_compartment" "level_2" {
155
155
description = each. value . description
156
156
enable_delete = each. value . enable_delete
157
157
defined_tags = each. value . defined_tags
158
- freeform_tags = each. value . freeform_tags
158
+ freeform_tags = merge (local . cislz_module_tag , each. value . freeform_tags )
159
159
}
160
160
161
161
resource "oci_identity_compartment" "level_3" {
@@ -170,7 +170,7 @@ resource "oci_identity_compartment" "level_3" {
170
170
description = each. value . description
171
171
enable_delete = each. value . enable_delete
172
172
defined_tags = each. value . defined_tags
173
- freeform_tags = each. value . freeform_tags
173
+ freeform_tags = merge (local . cislz_module_tag , each. value . freeform_tags )
174
174
}
175
175
176
176
resource "oci_identity_compartment" "level_4" {
@@ -185,7 +185,7 @@ resource "oci_identity_compartment" "level_4" {
185
185
description = each. value . description
186
186
enable_delete = each. value . enable_delete
187
187
defined_tags = each. value . defined_tags
188
- freeform_tags = each. value . freeform_tags
188
+ freeform_tags = merge (local . cislz_module_tag , each. value . freeform_tags )
189
189
}
190
190
191
191
resource "oci_identity_compartment" "level_5" {
@@ -200,7 +200,7 @@ resource "oci_identity_compartment" "level_5" {
200
200
description = each. value . description
201
201
enable_delete = each. value . enable_delete
202
202
defined_tags = each. value . defined_tags
203
- freeform_tags = each. value . freeform_tags
203
+ freeform_tags = merge (local . cislz_module_tag , each. value . freeform_tags )
204
204
}
205
205
206
206
resource "oci_identity_compartment" "level_6" {
@@ -215,7 +215,7 @@ resource "oci_identity_compartment" "level_6" {
215
215
description = each. value . description
216
216
enable_delete = each. value . enable_delete
217
217
defined_tags = each. value . defined_tags
218
- freeform_tags = each. value . freeform_tags
218
+ freeform_tags = merge (local . cislz_module_tag , each. value . freeform_tags )
219
219
}
220
220
221
221
resource "oci_identity_tag_default" "these" {
0 commit comments