Skip to content

Commit

Permalink
allow to list DRG that is managed in another compartment. (#16)
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Pham <[email protected]>
  • Loading branch information
thpham authored Aug 29, 2023
1 parent 73e3ec7 commit 433faf0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion drg.tf
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ resource "oci_core_drg" "drg" {
}

data "oci_core_drgs" "drg_data" {
compartment_id = var.compartment_id
compartment_id = coalesce(var.drg_compartment_id, var.compartment_id)

filter {
name = "id"
Expand Down
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ variable "compartment_id" {
# no default value, asking user to explicitly set this variable's value. see codingconventions.adoc
}

variable "drg_compartment_id" {
description = "compartment id where the DRG is located"
type = string
default = null
}

variable "label_prefix" {
description = "a string that will be prepended to all resources"
type = string
Expand Down

0 comments on commit 433faf0

Please sign in to comment.