AWS DataSync Location Efs

This page shows how to write Terraform and CloudFormation for DataSync Location Efs and write them securely.

aws_datasync_location_efs (Terraform)

The Location Efs in DataSync can be configured in Terraform with the resource name aws_datasync_location_efs. The following sections describe 3 examples of how to use the resource and its parameters.

Example Usage from GitHub
resource "aws_datasync_location_efs" "efs_source" {
  # 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 =  data.aws_efs_mount_target.source.file_system_arn

  ec2_config {
resource "aws_datasync_location_efs" "this" {
  efs_file_system_arn = var.efs_file_system_arn
  subdirectory        = var.subdirectory
  tags                = var.tags

  dynamic "ec2_config" {
resource "aws_datasync_location_efs" "wordpress_datasync_location_efs" {
  efs_file_system_arn = aws_efs_mount_target.wp_efs_mnt_a.file_system_arn
  subdirectory  = "/"

  ec2_config {
    security_group_arns = [aws_security_group.wp_location_dc_security_group.arn]

Review your Terraform file for AWS best practices

Shisho Cloud, our free checker to make sure your Terraform configuration follows best practices, is available (beta).


Explanation in Terraform Registry

Manages an AWS DataSync EFS Location.

NOTE: The EFS File System must have a mounted EFS Mount Target before creating this resource.

AWS::DataSync::LocationEFS (CloudFormation)

The LocationEFS in DataSync can be configured in CloudFormation with the resource name AWS::DataSync::LocationEFS. The following sections describe how to use the resource and its parameters.

Example Usage from GitHub

An example could not be found in GitHub.


Explanation in CloudFormation Registry

The AWS::DataSync::LocationEFS resource specifies an endpoint for an Amazon EFS location.

Frequently asked questions

What is AWS DataSync Location Efs?

AWS DataSync Location Efs is a resource for DataSync of Amazon Web Service. Settings can be wrote in Terraform and CloudFormation.

Where can I find the example code for the AWS DataSync Location Efs?

For Terraform, the fabiodsilva/terraform-efs-datasync-awsbackup, niveklabs/aws and melverano/aws_scheme_terraform source code examples are useful. See the Terraform Example section for further details.