File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,12 @@ data "oci_identity_compartment" "compartment" {
1212 id = var. compartment_ocid
1313}
1414
15+ // tenancy data if onboarding a tenancy
16+ data "oci_identity_tenancy" "tenancy" {
17+ count = var. compartment_ocid == " " ? 1 : 0
18+ tenancy_id = var. tenancy_ocid
19+ }
20+
1521
1622// random suffix for policy name
1723resource "random_id" "suffix" {
@@ -48,6 +54,7 @@ resource "sysdig_secure_cloud_auth_account" "oracle_account" {
4854 // when compartmentID is not specified, default to the rootCompartmentOCID which is the same value as tenancyOCID
4955 provider_id = var. compartment_ocid == " " ? var. tenancy_ocid : var. compartment_ocid
5056 provider_type = " PROVIDER_ORACLECLOUD"
57+ provider_alias = var. compartment_ocid == " " ? data. oci_identity_tenancy . tenancy [0 ]. name : data. oci_identity_compartment . compartment [0 ]. name
5158
5259 component {
5360 type = " COMPONENT_SERVICE_PRINCIPAL"
You can’t perform that action at this time.
0 commit comments