Skip to content

Commit 7e90422

Browse files
andrecorreanetoernaguroshelby-willis-lz
authored
Release 0.1.5 (#7)
* Release 0.1.3 * terraform version >= 1.3.0 * chore: release notes and version bump * feat: module tag updated to ocilz-terraform-module * chore: release notes updated * doc: SPECs updated * Updated var default_compartment_id to be optional * chore: release notes * feat: support for TENANCY-ROOT key word for referring to tenancy OCID. --------- Co-authored-by: Erna Guerrero <[email protected]> Co-authored-by: Shelby Willis <[email protected]>
1 parent 7a4b40d commit 7e90422

File tree

7 files changed

+13
-7
lines changed

7 files changed

+13
-7
lines changed

RELEASE-NOTES.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
# April 01, 2025 Release Notes - 0.1.5
2+
## Updates
3+
1. [Tags Module](./tags/)
4+
- Attribute *default_compartment_id* made optional in *tags_configuration*.
5+
- Support for reserved key value "TENANCY-ROOT" when referring to Root compartment OCID in attributes *default_compartment_id* and *compartment_id*.
6+
17
# August 27, 2024 Release Notes - 0.1.4
28
## Updates
39
1. All modules now require Terraform binary equal or greater than 1.3.0.

release.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.1.4
1+
0.1.5

tags/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ The module uses a single variable (*tags_configuration*) for configuring an arbi
7979

8080
The *default_* attributes are the following:
8181

82-
- **default_compartment_id**: (Optional) The default compartment id for all resources managed by this module. It can be overridden by *compartment_id* attribute in each resource. It defaults to the *tenancy_ocid* variable if undefined.
82+
- **default_compartment_id**: (Optional) The default compartment id for all resources managed by this module. It can be overridden by *compartment_id* attribute in each resource. For referring to the *tenancy_ocid*, leave it unassigned or use the reserved key "TENANCY-ROOT".
8383
- **default_defined_tags**: (Optional) The default defined tags that are applied to all resources managed by this module. It can be overridden by *defined_tags* attribute in each resource.
8484
- **default_freeform_tags**: (Optional) The default freeform tags that are applied to all resources managed by this module. It can be overridden by *freeform_tags* attribute in each resource.
8585

@@ -92,7 +92,7 @@ Defining tag namespaces and tags:
9292
- **namespaces**: A map of tag namespaces.
9393
- **name**: The tag namespace name.
9494
- **description**: (Optional) The tag namespace description. It defaults to tag namespace *name* if undefined.
95-
- **compartment_id**: (Optional) The compartment id for the tag namespace. It defaults to *default_compartment_id* if undefined.
95+
- **compartment_id**: (Optional) The compartment id for the tag namespace. It defaults to *default_compartment_id* if undefined. For referring to the *tenancy_ocid*, use the reserved key "TENANCY-ROOT".
9696
- **is_retired**: (Optional) Whether the tag namespace is retired. Default: false.
9797
- **defined_tags**: (Optional) The tag namespace defined tags. It defaults to *default_defined_tags* if undefined.
9898
- **freeform_tags**: (Optional) The tag namespace freeform tags. It defaults to *default_freeform_tags* if undefined.

tags/examples/external-dependency/variables.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ variable "home_region" {}
1010

1111
variable "tags_configuration" {
1212
type = object({
13-
default_compartment_id = string,
13+
default_compartment_id = optional(string),
1414
default_defined_tags = optional(map(string)),
1515
default_freeform_tags = optional(map(string))
1616
cis_namespace_name = optional(string),

tags/examples/vision/variables.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ variable "home_region" {}
1010

1111
variable "tags_configuration" {
1212
type = object({
13-
default_compartment_id = string,
13+
default_compartment_id = optional(string),
1414
default_defined_tags = optional(map(string)),
1515
default_freeform_tags = optional(map(string))
1616
cis_namespace_name = optional(string),

tags/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ locals {
130130
#-- It loops through a merged map of namespaces and the optional local cis_namespace.
131131
resource "oci_identity_tag_namespace" "these" {
132132
for_each = merge(var.tags_configuration.namespaces != null ? var.tags_configuration.namespaces : {}, local.cis_namespace)
133-
compartment_id = each.value.compartment_id != null ? (length(regexall("^ocid1.*$", each.value.compartment_id)) > 0 ? each.value.compartment_id : var.compartments_dependency[each.value.compartment_id].id) : (var.tags_configuration.default_compartment_id != null ? (length(regexall("^ocid1.*$", var.tags_configuration.default_compartment_id)) > 0 ? var.tags_configuration.default_compartment_id : var.compartments_dependency[var.tags_configuration.default_compartment_id].id): var.tenancy_ocid)
133+
compartment_id = each.value.compartment_id != null ? (upper(each.value.compartment_id) == "TENANCY-ROOT" ? var.tenancy_ocid : length(regexall("^ocid1.*$", each.value.compartment_id)) > 0 ? each.value.compartment_id : var.compartments_dependency[each.value.compartment_id].id) : (var.tags_configuration.default_compartment_id != null ? (upper(var.tags_configuration.default_compartment_id) == "TENANCY-ROOT") ? var.tenancy_ocid : (length(regexall("^ocid1.*$", var.tags_configuration.default_compartment_id)) > 0 ? var.tags_configuration.default_compartment_id : var.compartments_dependency[var.tags_configuration.default_compartment_id].id): var.tenancy_ocid)
134134
name = each.value.name
135135
description = coalesce(each.value.description, each.value.name)
136136
is_retired = each.value.is_retired != null ? each.value.is_retired : false

tags/variables.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ variable "tenancy_ocid" {
88

99
variable "tags_configuration" {
1010
type = object({
11-
default_compartment_id = string,
11+
default_compartment_id = optional(string),
1212
default_defined_tags = optional(map(string)),
1313
default_freeform_tags = optional(map(string))
1414
cis_namespace_name = optional(string),

0 commit comments

Comments
 (0)