Skip to content

Commit 5ac3a65

Browse files
robo-caphyder
authored andcommitted
Update drg module version. Add support for custom existing DRG compartment ID.
1 parent 10b2ae4 commit 5ac3a65

File tree

2 files changed

+13
-6
lines changed

2 files changed

+13
-6
lines changed

module-network.tf

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -78,13 +78,14 @@ module "vcn" {
7878
}
7979

8080
module "drg" {
81-
count = tobool(var.create_drg) || var.drg_id != null ? 1 : 0
82-
source = "oracle-terraform-modules/drg/oci"
83-
version = "1.0.5"
84-
compartment_id = coalesce(var.network_compartment_id, local.compartment_id)
81+
count = tobool(var.create_drg) || var.drg_id != null ? 1 : 0
82+
source = "oracle-terraform-modules/drg/oci"
83+
version = "1.0.6"
84+
compartment_id = coalesce(var.network_compartment_id, local.compartment_id)
85+
drg_compartment_id = var.drg_compartment_id
8586

86-
drg_id = one([var.drg_id]) # existing DRG ID or null
87-
drg_display_name = coalesce(var.drg_display_name, "oke-${local.state_id}")
87+
drg_id = one([var.drg_id]) # existing DRG ID or null
88+
drg_display_name = coalesce(var.drg_display_name, "oke-${local.state_id}")
8889
drg_vcn_attachments = tobool(var.create_drg) ? { for k, v in module.vcn : k => {
8990
# gets the vcn_id values dynamically from the vcn module
9091
vcn_id : v.vcn_id

variables-network.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,12 @@ variable "drg_id" {
7979
type = string
8080
}
8181

82+
variable "drg_compartment_id" {
83+
default = null
84+
description = "Compartment for the DRG resource. Can be used to override network_compartment_id."
85+
type = string
86+
}
87+
8288
variable "drg_attachments" {
8389
description = "DRG attachment configurations."
8490
type = any

0 commit comments

Comments
 (0)