Skip to content

Commit

Permalink
add support for custom drg id compartment
Browse files Browse the repository at this point in the history
  • Loading branch information
robo-cap committed Feb 28, 2024
1 parent f4cdb00 commit 7e208b1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion module-network.tf
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ module "drg" {
count = tobool(var.create_drg) || var.drg_id != null ? 1 : 0
source = "oracle-terraform-modules/drg/oci"
version = "1.0.5"
compartment_id = coalesce(var.network_compartment_id, local.compartment_id)
compartment_id = coalesce(var.drg_compartment_id, var.network_compartment_id, local.compartment_id)

drg_id = one([var.drg_id]) # existing DRG ID or null
drg_display_name = coalesce(var.drg_display_name, "oke-${local.state_id}")
Expand Down
6 changes: 6 additions & 0 deletions variables-network.tf
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,12 @@ variable "drg_id" {
type = string
}

variable "drg_compartment_id" {
default = null
description = "Compartment of the DRG"
type = string
}

variable "drg_attachments" {
description = "DRG attachment configurations."
type = any
Expand Down

0 comments on commit 7e208b1

Please sign in to comment.