Skip to content

Latest commit

 

History

History
61 lines (45 loc) · 1.64 KB

s3_bucket_directory.md

File metadata and controls

61 lines (45 loc) · 1.64 KB
page_title subcategory description
twc_s3_bucket_directory Resource - Timeweb Cloud
Resource for describing needed directory in S3 bucket. This resource support nested directories, but be carefully when parent directories are managed by other resource or managed directly from UI - this may lead to errors and requires manually removing from state

twc_s3_bucket_directory (Resource)

Resource for describing needed directory in S3 bucket. This resource support nested directories, but be carefully when parent directories are managed by other resource or managed directly from UI - this may lead to errors and requires manually removing from state

Примеры использования

data "twc_s3_preset" "example-s3-preset" {
  location = "ru-1"

  disk = 10 * 1024

  price_filter {
    from = 50
    to = 100
  }
}

resource "twc_s3_bucket" "example-s3-bucket" {
  name = "example-s3-bucket"
  type = "private"
  preset_id = data.twc_s3_preset.example-s3-preset.id
}

# Create some_directory in previously created bucket
resource "twc_s3_bucket_directory" "example-s3-bucket-directory" {
  bucket_id = twc_s3_bucket.example-s3-bucket.id

  name = "some_directory"
}

# This resource also allow to create nested directories
resource "twc_s3_bucket_directory" "example-s3-bucket-nested-directories" {
  bucket_id = twc_s3_bucket.example-s3-bucket.id

  name = "some/nested/directory"
}

Schema

Required

  • bucket_id (Number) S3 Bucket ID for which directory should be created
  • name (String) Directory name

Read-Only

  • id (String) The ID of this resource.