The following cloud brick enables you to create object storages in OCI
The following is the reference architecture associated to this brick
- Pre-existent Compartment structure
########## SAMPLE TFVAR FILE ##########
########## PROVIDER SPECIFIC VARIABLES ##########
region = "foo-region-1"
tenancy_ocid = "ocid1.tenancy.oc1..abcdefg"
user_ocid = "ocid1.user.oc1..aaaaaaabcdefg"
fingerprint = "fo:oo:ba:ar:ba:ar"
private_key_path = "/absolute/path/to/api/key/your_api_key.pem"
########## PROVIDER SPECIFIC VARIABLES ##########
########## ARTIFACT SPECIFIC VARIABLES ##########
object_storage_instance_compartment_name = "MY_ARTIFACT_COMPARTMENT"
bucket_access_type = "NoPublicAccess"
bucket_display_name = "my_bucket"
object_events_enabled = false
auto_tiering = "Disabled"
storage_tier = "Standard"
versioning = "Enabled"
########## ARTIFACT SPECIFIC VARIABLES ##########
########## SAMPLE TFVAR FILE ##########
- Variable
bucket_access_type
determines the type of access given to bucket. Available options areNoPublicAccess
- Variable
object_events_enabled
will trigger CloudEvents API to be enabled for bucket, so that upon any action on top of if, this can emit events to later on be integrated by API, for example with Oracle Functions - Variable
storage_tier
determines the tier related to the Object Storage. Potential values areStandard
andArchive
- Variable
auto_tiering
will trigger the movement of Object Storage from Standard to Infrecuent Access.
The following is the base provider definition to be used with this module
terraform {
required_version = ">= 0.13.5"
}
provider "oci" {
region = var.region
tenancy_ocid = var.tenancy_ocid
user_ocid = var.user_ocid
fingerprint = var.fingerprint
private_key_path = var.private_key_path
disable_auto_retries = "true"
}
provider "oci" {
alias = "home"
region = data.oci_identity_region_subscriptions.home_region_subscriptions.region_subscriptions[0].region_name
tenancy_ocid = var.tenancy_ocid
user_ocid = var.user_ocid
fingerprint = var.fingerprint
private_key_path = var.private_key_path
disable_auto_retries = "true"
}
No requirements.
Name | Version |
---|---|
oci | 4.40.0 |
No modules.
Name | Type |
---|---|
oci_objectstorage_bucket.Bucket | resource |
oci_identity_compartments.COMPARTMENTS | data source |
oci_objectstorage_namespace.NAMESPACE | data source |
Name | Description | Type | Default | Required |
---|---|---|---|---|
auto_tiering | Determines if autotiering is enabled for object | string |
"Enabled" |
no |
bucket_access_type | (Optional) (Updatable) The type of public access enabled on this bucket. A bucket is set to NoPublicAccess by default, which only allows an authenticated caller to access the bucket and its contents. When ObjectRead is enabled on the bucket, public access is allowed for the GetObject, HeadObject, and ListObjects operations. When ObjectReadWithoutList is enabled on the bucket, public access is allowed for the GetObject and HeadObject operations. | string |
"NoPublicAccess" |
no |
bucket_display_name | (Required) The name of the bucket. Valid characters are uppercase or lowercase letters, numbers, hyphens, underscores, and periods. Bucket names must be unique within an Object Storage namespace. Avoid entering confidential information. example: Example: my-new-bucket1 | any |
n/a | yes |
fingerprint | API Key Fingerprint for user_ocid derived from public API Key imported in OCI User config | any |
n/a | yes |
object_events_enabled | Whether or not events are emitted for object state changes in this bucket. By default, objectEventsEnabled is set to false. Set objectEventsEnabled to true to emit events for object state changes. For more information about events, see Overview of Events. | bool |
false |
no |
object_storage_instance_compartment_id | Object storage compartment OCID | string |
"" |
no |
object_storage_instance_compartment_name | Object storage compartment name | string |
"" |
no |
private_key_path | Private Key Absolute path location where terraform is executed | any |
n/a | yes |
region | Target region where artifacts are going to be created | any |
n/a | yes |
storage_tier | The storage tier type assigned to the bucket. A bucket is set to 'Standard' tier by default, which means objects uploaded or copied to the bucket will be in the standard storage tier. When the 'Archive' tier type is set explicitly for a bucket, objects uploaded or copied to the bucket will be stored in archive storage. The 'storageTier' property is immutable after bucket is created. | string |
"Standard" |
no |
tenancy_ocid | OCID of tenancy | any |
n/a | yes |
user_ocid | User OCID in tenancy. | any |
n/a | yes |
versioning | The versioning status on the bucket. A bucket is created with versioning Disabled by default. For versioning Enabled, objects are protected from overwrites and deletes, by maintaining their version history. When versioning is Suspended, the previous versions will still remain but new versions will no longer be created when overwitten or deleted. | string |
"Enabled" |
no |
Name | Description |
---|---|
bucket | Bucket Object |
This project is open source. Please submit your contributions by forking this repository and submitting a pull request! Oracle appreciates any contributions that are made by the open source community.
Copyright (c) 2021 Oracle and/or its affiliates.
Licensed under the Universal Permissive License (UPL), Version 1.0.
See LICENSE for more details.