Resource: aws_datasync_location_s3

Manages an S3 Location within AWS DataSync.

Example Usage

resource "aws_datasync_location_s3" "example" {
  s3_bucket_arn = aws_s3_bucket.example.arn
  subdirectory  = "/example/prefix"

  s3_config {
    bucket_access_role_arn = aws_iam_role.example.arn
  }
}

Argument Reference

This resource supports the following arguments:

s3_config Argument Reference

The s3_config configuration block 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 aws_datasync_location_s3 using the DataSync Task Amazon Resource Name (ARN). For example:

import {
  to = aws_datasync_location_s3.example
  id = "arn:aws:datasync:us-east-1:123456789012:location/loc-12345678901234567"
}

Using terraform import, import aws_datasync_location_s3 using the DataSync Task Amazon Resource Name (ARN). For example:

% terraform import aws_datasync_location_s3.example arn:aws:datasync:us-east-1:123456789012:location/loc-12345678901234567