Resource: aws_datasync_location_efs

Manages an AWS DataSync EFS Location.

Example Usage

resource "aws_datasync_location_efs" "example" {
  # The below example uses aws_efs_mount_target as a reference to ensure a mount target already exists when resource creation occurs.
  # You can accomplish the same behavior with depends_on or an aws_efs_mount_target data source reference.
  efs_file_system_arn = aws_efs_mount_target.example.file_system_arn

  ec2_config {
    security_group_arns = [aws_security_group.example.arn]
    subnet_arn          = aws_subnet.example.arn
  }
}

Argument Reference

This resource supports the following arguments:

ec2_config Argument Reference

The ec2_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_efs using the DataSync Task Amazon Resource Name (ARN). For example:

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

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

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