Resource: aws_s3control_access_grants_location

Provides a resource to manage an S3 Access Grants location. A location is an S3 resource (bucket or prefix) in a permission grant that the grantee can access. The S3 data must be in the same Region as your S3 Access Grants instance. When you register a location, you must include the IAM role that has permission to manage the S3 location that you are registering.

Example Usage

resource "aws_s3control_access_grants_instance" "example" {}

resource "aws_s3control_access_grants_location" "example" {
  depends_on = [aws_s3control_access_grants_instance.example]

  iam_role_arn   = aws_iam_role.example.arn
  location_scope = "s3://" # Default scope.
}

Argument Reference

This resource supports the following arguments:

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 S3 Access Grants locations using the account_id and access_grants_location_id, separated by a comma (,). For example:

import {
  to = aws_s3control_access_grants_location.example
  id = "123456789012,default"
}

Using terraform import, import S3 Access Grants locations using the account_id and access_grants_location_id, separated by a comma (,). For example:

% terraform import aws_s3control_access_grants_location.example 123456789012,default