Created
February 22, 2021 18:30
-
-
Save recursivecodes/842db55332bb8f623913b4384a88f2e0 to your computer and use it in GitHub Desktop.
data.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
variable "compartment_ocid" {} | |
variable "region" {} | |
variable "bucket_name" {} | |
provider "oci" { | |
region = var.region | |
} | |
data "oci_objectstorage_namespace" "namespace" { | |
compartment_id = var.compartment_ocid | |
} | |
resource "oci_objectstorage_bucket" "create_bucket" { | |
# required | |
compartment_id = var.compartment_ocid | |
name = var.bucket_name | |
namespace = data.oci_objectstorage_namespace.namespace.namespace | |
# optional | |
access_type = "NoPublicAccess" # <---- updated from "ObjectRead" | |
} | |
output "new_bucket" { | |
value = oci_objectstorage_bucket.create_bucket | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment