| page_title | stackit_objectstorage_bucket Resource - stackit |
|---|---|
| subcategory | |
| description | ObjectStorage bucket resource schema. Must have a region specified in the provider configuration. If you are creating credentialsgroup and bucket resources simultaneously, please include the depends_on field so that they are created sequentially. This prevents errors from concurrent calls to the service enablement that is done in the background. |
ObjectStorage bucket resource schema. Must have a region specified in the provider configuration. If you are creating credentialsgroup and bucket resources simultaneously, please include the depends_on field so that they are created sequentially. This prevents errors from concurrent calls to the service enablement that is done in the background.
resource "stackit_objectstorage_bucket" "example" {
project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
name = "example-bucket"
}
## With compliance lock
resource "stackit_objectstorage_compliance_lock" "example_with_lock" {
project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
resource "stackit_objectstorage_bucket" "example_with_lock" {
depends_on = [stackit_objectstorage_compliance_lock.example_with_lock]
project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
name = "example-bucket-with-lock"
object_lock = true
}
# Only use the import statement, if you want to import an existing objectstorage bucket
import {
to = stackit_objectstorage_bucket.import-example
id = "${var.project_id},${var.region},${var.bucket_name}"
}name(String) The bucket name. It must be DNS conform.project_id(String) STACKIT Project ID to which the bucket is associated.
object_lock(Boolean) Enable Object Lock on this bucket. Can only be set at creation time. Requires an active project-level compliance lock.region(String) The resource region. If not defined, the provider region is used.
id(String) Terraform's internal resource identifier. It is structured as "project_id,region,name".url_path_style(String)url_virtual_hosted_style(String)