Resource: aws_s3control_multi_region_access_point

Provides a resource to manage an S3 Multi-Region Access Point associated with specified buckets.

Example Usage

Multiple AWS Buckets in Different Regions

provider "aws" {
  region = "us-east-1"
  alias  = "primary_region"
}

provider "aws" {
  region = "us-west-2"
  alias  = "secondary_region"
}

resource "aws_s3_bucket" "foo_bucket" {
  provider = aws.primary_region

  bucket = "example-bucket-foo"
}

resource "aws_s3_bucket" "bar_bucket" {
  provider = aws.secondary_region

  bucket = "example-bucket-bar"
}

resource "aws_s3control_multi_region_access_point" "example" {
  details {
    name = "example"

    region {
      bucket = aws_s3_bucket.foo_bucket.id
    }

    region {
      bucket = aws_s3_bucket.bar_bucket.id
    }
  }
}

Argument Reference

This resource supports the following arguments:

Timeouts

Configuration options:

Details Configuration

The details block supports the following:

For more information, see the documentation on Multi-Region Access Points.

Public Access Block Configuration

The public_access_block block supports the following:

Region Configuration

The region block supports the following:

Attribute Reference

This resource exports the following attributes in addition to the arguments above:

Import

In Terraform v1.5.0 and later, use an import block to import Multi-Region Access Points using the account_id and name of the Multi-Region Access Point separated by a colon (:). For example:

import {
  to = aws_s3control_multi_region_access_point.example
  id = "123456789012:example"
}

Using terraform import, import Multi-Region Access Points using the account_id and name of the Multi-Region Access Point separated by a colon (:). For example:

% terraform import aws_s3control_multi_region_access_point.example 123456789012:example