-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnamespace.tf
36 lines (27 loc) · 1.17 KB
/
namespace.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// Copyright (c) 2017, 2021, Oracle and/or its affiliates. All rights reserved.
// Licensed under the Mozilla Public License v2.0
/*
* This example file shows how to read and output the object storage namespace and namespace_metadata.
*/
data "oci_objectstorage_namespace" "ns" {
#Optional
compartment_id = var.compartment_ocid
}
output "namespace" {
value = data.oci_objectstorage_namespace.ns.namespace
}
resource "oci_objectstorage_namespace_metadata" "namespace-metadata1" {
namespace = data.oci_objectstorage_namespace.ns.namespace
default_s3compartment_id = var.compartment_ocid
default_swift_compartment_id = var.compartment_ocid
}
data "oci_objectstorage_namespace_metadata" "namespace-metadata1" {
namespace = data.oci_objectstorage_namespace.ns.namespace
}
output "namespace-metadata" {
value = <<EOF
namespace = ${data.oci_objectstorage_namespace_metadata.namespace-metadata1.namespace}
default_s3compartment_id = ${data.oci_objectstorage_namespace_metadata.namespace-metadata1.default_s3compartment_id}
default_swift_compartment_id = ${data.oci_objectstorage_namespace_metadata.namespace-metadata1.default_swift_compartment_id}
EOF
}