Skip to content

Instantly share code, notes, and snippets.

@recursivecodes
Created February 22, 2021 18:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save recursivecodes/757803d10cd621b9e8a66fb9bf35d752 to your computer and use it in GitHub Desktop.
Save recursivecodes/757803d10cd621b9e8a66fb9bf35d752 to your computer and use it in GitHub Desktop.
demo.tf
variable "compartment_ocid" {
    default = "ocid1.compartment.oc1..[redacted]"
}
variable "region" {
    default = "us-phoenix-1"
}
variable "bucket_namespace" {
    default = "toddrsharp"
}
variable "bucket_name" {
    default = "resource_manager_demo_bucket"
}
provider "oci" {
    region = var.region
}
resource "oci_objectstorage_bucket" "create_bucket" {
    # required
    compartment_id = var.compartment_ocid
    name = var.bucket_name
    namespace = var.bucket_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