aws logo
AWS Classic v5.41.0, May 15 23

aws.datasync.EfsLocation

Explore with Pulumi AI

Manages an AWS DataSync EFS Location.

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

Example Usage

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() => 
{
    var example = new Aws.DataSync.EfsLocation("example", new()
    {
        EfsFileSystemArn = aws_efs_mount_target.Example.File_system_arn,
        Ec2Config = new Aws.DataSync.Inputs.EfsLocationEc2ConfigArgs
        {
            SecurityGroupArns = new[]
            {
                aws_security_group.Example.Arn,
            },
            SubnetArn = aws_subnet.Example.Arn,
        },
    });

});
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v5/go/aws"
	"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/datasync"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := datasync.NewEfsLocation(ctx, "example", &datasync.EfsLocationArgs{
			EfsFileSystemArn: pulumi.Any(aws_efs_mount_target.Example.File_system_arn),
			Ec2Config: &datasync.EfsLocationEc2ConfigArgs{
				SecurityGroupArns: pulumi.StringArray{
					aws_security_group.Example.Arn,
				},
				SubnetArn: pulumi.Any(aws_subnet.Example.Arn),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.datasync.EfsLocation;
import com.pulumi.aws.datasync.EfsLocationArgs;
import com.pulumi.aws.datasync.inputs.EfsLocationEc2ConfigArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var example = new EfsLocation("example", EfsLocationArgs.builder()        
            .efsFileSystemArn(aws_efs_mount_target.example().file_system_arn())
            .ec2Config(EfsLocationEc2ConfigArgs.builder()
                .securityGroupArns(aws_security_group.example().arn())
                .subnetArn(aws_subnet.example().arn())
                .build())
            .build());

    }
}
import pulumi
import pulumi_aws as aws

example = aws.datasync.EfsLocation("example",
    efs_file_system_arn=aws_efs_mount_target["example"]["file_system_arn"],
    ec2_config=aws.datasync.EfsLocationEc2ConfigArgs(
        security_group_arns=[aws_security_group["example"]["arn"]],
        subnet_arn=aws_subnet["example"]["arn"],
    ))
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = new aws.datasync.EfsLocation("example", {
    efsFileSystemArn: aws_efs_mount_target.example.file_system_arn,
    ec2Config: {
        securityGroupArns: [aws_security_group.example.arn],
        subnetArn: aws_subnet.example.arn,
    },
});
resources:
  example:
    type: aws:datasync:EfsLocation
    properties:
      # 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.
      efsFileSystemArn: ${aws_efs_mount_target.example.file_system_arn}
      ec2Config:
        securityGroupArns:
          - ${aws_security_group.example.arn}
        subnetArn: ${aws_subnet.example.arn}

Create EfsLocation Resource

new EfsLocation(name: string, args: EfsLocationArgs, opts?: CustomResourceOptions);
@overload
def EfsLocation(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                access_point_arn: Optional[str] = None,
                ec2_config: Optional[EfsLocationEc2ConfigArgs] = None,
                efs_file_system_arn: Optional[str] = None,
                file_system_access_role_arn: Optional[str] = None,
                in_transit_encryption: Optional[str] = None,
                subdirectory: Optional[str] = None,
                tags: Optional[Mapping[str, str]] = None)
@overload
def EfsLocation(resource_name: str,
                args: EfsLocationArgs,
                opts: Optional[ResourceOptions] = None)
func NewEfsLocation(ctx *Context, name string, args EfsLocationArgs, opts ...ResourceOption) (*EfsLocation, error)
public EfsLocation(string name, EfsLocationArgs args, CustomResourceOptions? opts = null)
public EfsLocation(String name, EfsLocationArgs args)
public EfsLocation(String name, EfsLocationArgs args, CustomResourceOptions options)
type: aws:datasync:EfsLocation
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args EfsLocationArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args EfsLocationArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args EfsLocationArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args EfsLocationArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args EfsLocationArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

EfsLocation Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

The EfsLocation resource accepts the following input properties:

Ec2Config EfsLocationEc2ConfigArgs

Configuration block containing EC2 configurations for connecting to the EFS File System.

EfsFileSystemArn string

Amazon Resource Name (ARN) of EFS File System.

AccessPointArn string

Specifies the Amazon Resource Name (ARN) of the access point that DataSync uses to access the Amazon EFS file system.

FileSystemAccessRoleArn string

Specifies an Identity and Access Management (IAM) role that DataSync assumes when mounting the Amazon EFS file system.

InTransitEncryption string

Specifies whether you want DataSync to use TLS encryption when transferring data to or from your Amazon EFS file system. Valid values are NONE and TLS1_2.

Subdirectory string

Subdirectory to perform actions as source or destination. Default /.

Tags Dictionary<string, string>

Key-value pairs of resource tags to assign to the DataSync Location. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

Ec2Config EfsLocationEc2ConfigArgs

Configuration block containing EC2 configurations for connecting to the EFS File System.

EfsFileSystemArn string

Amazon Resource Name (ARN) of EFS File System.

AccessPointArn string

Specifies the Amazon Resource Name (ARN) of the access point that DataSync uses to access the Amazon EFS file system.

FileSystemAccessRoleArn string

Specifies an Identity and Access Management (IAM) role that DataSync assumes when mounting the Amazon EFS file system.

InTransitEncryption string

Specifies whether you want DataSync to use TLS encryption when transferring data to or from your Amazon EFS file system. Valid values are NONE and TLS1_2.

Subdirectory string

Subdirectory to perform actions as source or destination. Default /.

Tags map[string]string

Key-value pairs of resource tags to assign to the DataSync Location. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

ec2Config EfsLocationEc2ConfigArgs

Configuration block containing EC2 configurations for connecting to the EFS File System.

efsFileSystemArn String

Amazon Resource Name (ARN) of EFS File System.

accessPointArn String

Specifies the Amazon Resource Name (ARN) of the access point that DataSync uses to access the Amazon EFS file system.

fileSystemAccessRoleArn String

Specifies an Identity and Access Management (IAM) role that DataSync assumes when mounting the Amazon EFS file system.

inTransitEncryption String

Specifies whether you want DataSync to use TLS encryption when transferring data to or from your Amazon EFS file system. Valid values are NONE and TLS1_2.

subdirectory String

Subdirectory to perform actions as source or destination. Default /.

tags Map<String,String>

Key-value pairs of resource tags to assign to the DataSync Location. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

ec2Config EfsLocationEc2ConfigArgs

Configuration block containing EC2 configurations for connecting to the EFS File System.

efsFileSystemArn ARN

Amazon Resource Name (ARN) of EFS File System.

accessPointArn string

Specifies the Amazon Resource Name (ARN) of the access point that DataSync uses to access the Amazon EFS file system.

fileSystemAccessRoleArn string

Specifies an Identity and Access Management (IAM) role that DataSync assumes when mounting the Amazon EFS file system.

inTransitEncryption string

Specifies whether you want DataSync to use TLS encryption when transferring data to or from your Amazon EFS file system. Valid values are NONE and TLS1_2.

subdirectory string

Subdirectory to perform actions as source or destination. Default /.

tags {[key: string]: string}

Key-value pairs of resource tags to assign to the DataSync Location. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

ec2_config EfsLocationEc2ConfigArgs

Configuration block containing EC2 configurations for connecting to the EFS File System.

efs_file_system_arn str

Amazon Resource Name (ARN) of EFS File System.

access_point_arn str

Specifies the Amazon Resource Name (ARN) of the access point that DataSync uses to access the Amazon EFS file system.

file_system_access_role_arn str

Specifies an Identity and Access Management (IAM) role that DataSync assumes when mounting the Amazon EFS file system.

in_transit_encryption str

Specifies whether you want DataSync to use TLS encryption when transferring data to or from your Amazon EFS file system. Valid values are NONE and TLS1_2.

subdirectory str

Subdirectory to perform actions as source or destination. Default /.

tags Mapping[str, str]

Key-value pairs of resource tags to assign to the DataSync Location. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

ec2Config Property Map

Configuration block containing EC2 configurations for connecting to the EFS File System.

efsFileSystemArn

Amazon Resource Name (ARN) of EFS File System.

accessPointArn String

Specifies the Amazon Resource Name (ARN) of the access point that DataSync uses to access the Amazon EFS file system.

fileSystemAccessRoleArn String

Specifies an Identity and Access Management (IAM) role that DataSync assumes when mounting the Amazon EFS file system.

inTransitEncryption String

Specifies whether you want DataSync to use TLS encryption when transferring data to or from your Amazon EFS file system. Valid values are NONE and TLS1_2.

subdirectory String

Subdirectory to perform actions as source or destination. Default /.

tags Map<String>

Key-value pairs of resource tags to assign to the DataSync Location. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

Outputs

All input properties are implicitly available as output properties. Additionally, the EfsLocation resource produces the following output properties:

Arn string

Amazon Resource Name (ARN) of the DataSync Location.

Id string

The provider-assigned unique ID for this managed resource.

TagsAll Dictionary<string, string>

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Uri string
Arn string

Amazon Resource Name (ARN) of the DataSync Location.

Id string

The provider-assigned unique ID for this managed resource.

TagsAll map[string]string

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Uri string
arn String

Amazon Resource Name (ARN) of the DataSync Location.

id String

The provider-assigned unique ID for this managed resource.

tagsAll Map<String,String>

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

uri String
arn string

Amazon Resource Name (ARN) of the DataSync Location.

id string

The provider-assigned unique ID for this managed resource.

tagsAll {[key: string]: string}

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

uri string
arn str

Amazon Resource Name (ARN) of the DataSync Location.

id str

The provider-assigned unique ID for this managed resource.

tags_all Mapping[str, str]

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

uri str
arn String

Amazon Resource Name (ARN) of the DataSync Location.

id String

The provider-assigned unique ID for this managed resource.

tagsAll Map<String>

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

uri String

Look up Existing EfsLocation Resource

Get an existing EfsLocation resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: EfsLocationState, opts?: CustomResourceOptions): EfsLocation
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        access_point_arn: Optional[str] = None,
        arn: Optional[str] = None,
        ec2_config: Optional[EfsLocationEc2ConfigArgs] = None,
        efs_file_system_arn: Optional[str] = None,
        file_system_access_role_arn: Optional[str] = None,
        in_transit_encryption: Optional[str] = None,
        subdirectory: Optional[str] = None,
        tags: Optional[Mapping[str, str]] = None,
        tags_all: Optional[Mapping[str, str]] = None,
        uri: Optional[str] = None) -> EfsLocation
func GetEfsLocation(ctx *Context, name string, id IDInput, state *EfsLocationState, opts ...ResourceOption) (*EfsLocation, error)
public static EfsLocation Get(string name, Input<string> id, EfsLocationState? state, CustomResourceOptions? opts = null)
public static EfsLocation get(String name, Output<String> id, EfsLocationState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
AccessPointArn string

Specifies the Amazon Resource Name (ARN) of the access point that DataSync uses to access the Amazon EFS file system.

Arn string

Amazon Resource Name (ARN) of the DataSync Location.

Ec2Config EfsLocationEc2ConfigArgs

Configuration block containing EC2 configurations for connecting to the EFS File System.

EfsFileSystemArn string

Amazon Resource Name (ARN) of EFS File System.

FileSystemAccessRoleArn string

Specifies an Identity and Access Management (IAM) role that DataSync assumes when mounting the Amazon EFS file system.

InTransitEncryption string

Specifies whether you want DataSync to use TLS encryption when transferring data to or from your Amazon EFS file system. Valid values are NONE and TLS1_2.

Subdirectory string

Subdirectory to perform actions as source or destination. Default /.

Tags Dictionary<string, string>

Key-value pairs of resource tags to assign to the DataSync Location. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

TagsAll Dictionary<string, string>

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Uri string
AccessPointArn string

Specifies the Amazon Resource Name (ARN) of the access point that DataSync uses to access the Amazon EFS file system.

Arn string

Amazon Resource Name (ARN) of the DataSync Location.

Ec2Config EfsLocationEc2ConfigArgs

Configuration block containing EC2 configurations for connecting to the EFS File System.

EfsFileSystemArn string

Amazon Resource Name (ARN) of EFS File System.

FileSystemAccessRoleArn string

Specifies an Identity and Access Management (IAM) role that DataSync assumes when mounting the Amazon EFS file system.

InTransitEncryption string

Specifies whether you want DataSync to use TLS encryption when transferring data to or from your Amazon EFS file system. Valid values are NONE and TLS1_2.

Subdirectory string

Subdirectory to perform actions as source or destination. Default /.

Tags map[string]string

Key-value pairs of resource tags to assign to the DataSync Location. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

TagsAll map[string]string

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Uri string
accessPointArn String

Specifies the Amazon Resource Name (ARN) of the access point that DataSync uses to access the Amazon EFS file system.

arn String

Amazon Resource Name (ARN) of the DataSync Location.

ec2Config EfsLocationEc2ConfigArgs

Configuration block containing EC2 configurations for connecting to the EFS File System.

efsFileSystemArn String

Amazon Resource Name (ARN) of EFS File System.

fileSystemAccessRoleArn String

Specifies an Identity and Access Management (IAM) role that DataSync assumes when mounting the Amazon EFS file system.

inTransitEncryption String

Specifies whether you want DataSync to use TLS encryption when transferring data to or from your Amazon EFS file system. Valid values are NONE and TLS1_2.

subdirectory String

Subdirectory to perform actions as source or destination. Default /.

tags Map<String,String>

Key-value pairs of resource tags to assign to the DataSync Location. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

tagsAll Map<String,String>

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

uri String
accessPointArn string

Specifies the Amazon Resource Name (ARN) of the access point that DataSync uses to access the Amazon EFS file system.

arn string

Amazon Resource Name (ARN) of the DataSync Location.

ec2Config EfsLocationEc2ConfigArgs

Configuration block containing EC2 configurations for connecting to the EFS File System.

efsFileSystemArn ARN

Amazon Resource Name (ARN) of EFS File System.

fileSystemAccessRoleArn string

Specifies an Identity and Access Management (IAM) role that DataSync assumes when mounting the Amazon EFS file system.

inTransitEncryption string

Specifies whether you want DataSync to use TLS encryption when transferring data to or from your Amazon EFS file system. Valid values are NONE and TLS1_2.

subdirectory string

Subdirectory to perform actions as source or destination. Default /.

tags {[key: string]: string}

Key-value pairs of resource tags to assign to the DataSync Location. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

tagsAll {[key: string]: string}

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

uri string
access_point_arn str

Specifies the Amazon Resource Name (ARN) of the access point that DataSync uses to access the Amazon EFS file system.

arn str

Amazon Resource Name (ARN) of the DataSync Location.

ec2_config EfsLocationEc2ConfigArgs

Configuration block containing EC2 configurations for connecting to the EFS File System.

efs_file_system_arn str

Amazon Resource Name (ARN) of EFS File System.

file_system_access_role_arn str

Specifies an Identity and Access Management (IAM) role that DataSync assumes when mounting the Amazon EFS file system.

in_transit_encryption str

Specifies whether you want DataSync to use TLS encryption when transferring data to or from your Amazon EFS file system. Valid values are NONE and TLS1_2.

subdirectory str

Subdirectory to perform actions as source or destination. Default /.

tags Mapping[str, str]

Key-value pairs of resource tags to assign to the DataSync Location. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

tags_all Mapping[str, str]

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

uri str
accessPointArn String

Specifies the Amazon Resource Name (ARN) of the access point that DataSync uses to access the Amazon EFS file system.

arn String

Amazon Resource Name (ARN) of the DataSync Location.

ec2Config Property Map

Configuration block containing EC2 configurations for connecting to the EFS File System.

efsFileSystemArn

Amazon Resource Name (ARN) of EFS File System.

fileSystemAccessRoleArn String

Specifies an Identity and Access Management (IAM) role that DataSync assumes when mounting the Amazon EFS file system.

inTransitEncryption String

Specifies whether you want DataSync to use TLS encryption when transferring data to or from your Amazon EFS file system. Valid values are NONE and TLS1_2.

subdirectory String

Subdirectory to perform actions as source or destination. Default /.

tags Map<String>

Key-value pairs of resource tags to assign to the DataSync Location. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

tagsAll Map<String>

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

uri String

Supporting Types

EfsLocationEc2Config

SecurityGroupArns List<string>

List of Amazon Resource Names (ARNs) of the EC2 Security Groups that are associated with the EFS Mount Target.

SubnetArn string

Amazon Resource Name (ARN) of the EC2 Subnet that is associated with the EFS Mount Target.

SecurityGroupArns []string

List of Amazon Resource Names (ARNs) of the EC2 Security Groups that are associated with the EFS Mount Target.

SubnetArn string

Amazon Resource Name (ARN) of the EC2 Subnet that is associated with the EFS Mount Target.

securityGroupArns List<String>

List of Amazon Resource Names (ARNs) of the EC2 Security Groups that are associated with the EFS Mount Target.

subnetArn String

Amazon Resource Name (ARN) of the EC2 Subnet that is associated with the EFS Mount Target.

securityGroupArns string[]

List of Amazon Resource Names (ARNs) of the EC2 Security Groups that are associated with the EFS Mount Target.

subnetArn string

Amazon Resource Name (ARN) of the EC2 Subnet that is associated with the EFS Mount Target.

security_group_arns Sequence[str]

List of Amazon Resource Names (ARNs) of the EC2 Security Groups that are associated with the EFS Mount Target.

subnet_arn str

Amazon Resource Name (ARN) of the EC2 Subnet that is associated with the EFS Mount Target.

securityGroupArns List<String>

List of Amazon Resource Names (ARNs) of the EC2 Security Groups that are associated with the EFS Mount Target.

subnetArn String

Amazon Resource Name (ARN) of the EC2 Subnet that is associated with the EFS Mount Target.

Import

aws_datasync_location_efs can be imported by using the DataSync Task Amazon Resource Name (ARN), e.g.,

 $ pulumi import aws:datasync/efsLocation:EfsLocation example arn:aws:datasync:us-east-1:123456789012:location/loc-12345678901234567

Package Details

Repository
AWS Classic pulumi/pulumi-aws
License
Apache-2.0
Notes

This Pulumi package is based on the aws Terraform Provider.