Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow to list DRG that is managed in another compartment. #16

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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