Try AWS Native preview for resources not in the classic version.
aws.datasync.EfsLocation
Explore with Pulumi AI
Try AWS Native preview for resources not in the classic version.
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/v6/go/aws"
"github.com/pulumi/pulumi-aws/sdk/v6/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
Efs
Location Ec2Config Configuration block containing EC2 configurations for connecting to the EFS File System.
- Efs
File stringSystem Arn Amazon Resource Name (ARN) of EFS File System.
- Access
Point stringArn Specifies the Amazon Resource Name (ARN) of the access point that DataSync uses to access the Amazon EFS file system.
- File
System stringAccess Role Arn Specifies an Identity and Access Management (IAM) role that DataSync assumes when mounting the Amazon EFS file system.
- In
Transit stringEncryption Specifies whether you want DataSync to use TLS encryption when transferring data to or from your Amazon EFS file system. Valid values are
NONE
andTLS1_2
.- Subdirectory string
Subdirectory to perform actions as source or destination. Default
/
.- 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
Efs
Location Ec2Config Args Configuration block containing EC2 configurations for connecting to the EFS File System.
- Efs
File stringSystem Arn Amazon Resource Name (ARN) of EFS File System.
- Access
Point stringArn Specifies the Amazon Resource Name (ARN) of the access point that DataSync uses to access the Amazon EFS file system.
- File
System stringAccess Role Arn Specifies an Identity and Access Management (IAM) role that DataSync assumes when mounting the Amazon EFS file system.
- In
Transit stringEncryption Specifies whether you want DataSync to use TLS encryption when transferring data to or from your Amazon EFS file system. Valid values are
NONE
andTLS1_2
.- Subdirectory string
Subdirectory to perform actions as source or destination. Default
/
.- 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
Efs
Location Ec2Config Configuration block containing EC2 configurations for connecting to the EFS File System.
- efs
File StringSystem Arn Amazon Resource Name (ARN) of EFS File System.
- access
Point StringArn Specifies the Amazon Resource Name (ARN) of the access point that DataSync uses to access the Amazon EFS file system.
- file
System StringAccess Role Arn Specifies an Identity and Access Management (IAM) role that DataSync assumes when mounting the Amazon EFS file system.
- in
Transit StringEncryption Specifies whether you want DataSync to use TLS encryption when transferring data to or from your Amazon EFS file system. Valid values are
NONE
andTLS1_2
.- subdirectory String
Subdirectory to perform actions as source or destination. Default
/
.- 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
Efs
Location Ec2Config Configuration block containing EC2 configurations for connecting to the EFS File System.
- efs
File ARNSystem Arn Amazon Resource Name (ARN) of EFS File System.
- access
Point stringArn Specifies the Amazon Resource Name (ARN) of the access point that DataSync uses to access the Amazon EFS file system.
- file
System stringAccess Role Arn Specifies an Identity and Access Management (IAM) role that DataSync assumes when mounting the Amazon EFS file system.
- in
Transit stringEncryption Specifies whether you want DataSync to use TLS encryption when transferring data to or from your Amazon EFS file system. Valid values are
NONE
andTLS1_2
.- subdirectory string
Subdirectory to perform actions as source or destination. Default
/
.- {[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 EfsLocation Ec2Config Args Configuration block containing EC2 configurations for connecting to the EFS File System.
- efs_
file_ strsystem_ arn Amazon Resource Name (ARN) of EFS File System.
- access_
point_ strarn Specifies the Amazon Resource Name (ARN) of the access point that DataSync uses to access the Amazon EFS file system.
- file_
system_ straccess_ role_ arn Specifies an Identity and Access Management (IAM) role that DataSync assumes when mounting the Amazon EFS file system.
- in_
transit_ strencryption Specifies whether you want DataSync to use TLS encryption when transferring data to or from your Amazon EFS file system. Valid values are
NONE
andTLS1_2
.- subdirectory str
Subdirectory to perform actions as source or destination. Default
/
.- 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.
- efs
File System Arn Amazon Resource Name (ARN) of EFS File System.
- access
Point StringArn Specifies the Amazon Resource Name (ARN) of the access point that DataSync uses to access the Amazon EFS file system.
- file
System StringAccess Role Arn Specifies an Identity and Access Management (IAM) role that DataSync assumes when mounting the Amazon EFS file system.
- in
Transit StringEncryption Specifies whether you want DataSync to use TLS encryption when transferring data to or from your Amazon EFS file system. Valid values are
NONE
andTLS1_2
.- subdirectory String
Subdirectory to perform actions as source or destination. Default
/
.- 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.
- Dictionary<string, string>
A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.Please use
tags
instead.- Uri string
- arn string
Amazon Resource Name (ARN) of the DataSync Location.
- id string
The provider-assigned unique ID for this managed resource.
- {[key: string]: string}
A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.Please use
tags
instead.- 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.
- Access
Point stringArn 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
Efs
Location Ec2Config Configuration block containing EC2 configurations for connecting to the EFS File System.
- Efs
File stringSystem Arn Amazon Resource Name (ARN) of EFS File System.
- File
System stringAccess Role Arn Specifies an Identity and Access Management (IAM) role that DataSync assumes when mounting the Amazon EFS file system.
- In
Transit stringEncryption Specifies whether you want DataSync to use TLS encryption when transferring data to or from your Amazon EFS file system. Valid values are
NONE
andTLS1_2
.- Subdirectory string
Subdirectory to perform actions as source or destination. Default
/
.- 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.- Dictionary<string, string>
A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.Please use
tags
instead.- Uri string
- Access
Point stringArn 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
Efs
Location Ec2Config Args Configuration block containing EC2 configurations for connecting to the EFS File System.
- Efs
File stringSystem Arn Amazon Resource Name (ARN) of EFS File System.
- File
System stringAccess Role Arn Specifies an Identity and Access Management (IAM) role that DataSync assumes when mounting the Amazon EFS file system.
- In
Transit stringEncryption Specifies whether you want DataSync to use TLS encryption when transferring data to or from your Amazon EFS file system. Valid values are
NONE
andTLS1_2
.- Subdirectory string
Subdirectory to perform actions as source or destination. Default
/
.- 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.- map[string]string
A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.Please use
tags
instead.- Uri string
- access
Point StringArn 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
Efs
Location Ec2Config Configuration block containing EC2 configurations for connecting to the EFS File System.
- efs
File StringSystem Arn Amazon Resource Name (ARN) of EFS File System.
- file
System StringAccess Role Arn Specifies an Identity and Access Management (IAM) role that DataSync assumes when mounting the Amazon EFS file system.
- in
Transit StringEncryption Specifies whether you want DataSync to use TLS encryption when transferring data to or from your Amazon EFS file system. Valid values are
NONE
andTLS1_2
.- subdirectory String
Subdirectory to perform actions as source or destination. Default
/
.- 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.- Map<String,String>
A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.Please use
tags
instead.- uri String
- access
Point stringArn 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
Efs
Location Ec2Config Configuration block containing EC2 configurations for connecting to the EFS File System.
- efs
File ARNSystem Arn Amazon Resource Name (ARN) of EFS File System.
- file
System stringAccess Role Arn Specifies an Identity and Access Management (IAM) role that DataSync assumes when mounting the Amazon EFS file system.
- in
Transit stringEncryption Specifies whether you want DataSync to use TLS encryption when transferring data to or from your Amazon EFS file system. Valid values are
NONE
andTLS1_2
.- subdirectory string
Subdirectory to perform actions as source or destination. Default
/
.- {[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.- {[key: string]: string}
A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.Please use
tags
instead.- uri string
- access_
point_ strarn 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 EfsLocation Ec2Config Args Configuration block containing EC2 configurations for connecting to the EFS File System.
- efs_
file_ strsystem_ arn Amazon Resource Name (ARN) of EFS File System.
- file_
system_ straccess_ role_ arn Specifies an Identity and Access Management (IAM) role that DataSync assumes when mounting the Amazon EFS file system.
- in_
transit_ strencryption Specifies whether you want DataSync to use TLS encryption when transferring data to or from your Amazon EFS file system. Valid values are
NONE
andTLS1_2
.- subdirectory str
Subdirectory to perform actions as source or destination. Default
/
.- 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.- Mapping[str, str]
A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.Please use
tags
instead.- uri str
- access
Point StringArn 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.
- efs
File System Arn Amazon Resource Name (ARN) of EFS File System.
- file
System StringAccess Role Arn Specifies an Identity and Access Management (IAM) role that DataSync assumes when mounting the Amazon EFS file system.
- in
Transit StringEncryption Specifies whether you want DataSync to use TLS encryption when transferring data to or from your Amazon EFS file system. Valid values are
NONE
andTLS1_2
.- subdirectory String
Subdirectory to perform actions as source or destination. Default
/
.- 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.- Map<String>
A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.Please use
tags
instead.- uri String
Supporting Types
EfsLocationEc2Config, EfsLocationEc2ConfigArgs
- Security
Group List<string>Arns List of Amazon Resource Names (ARNs) of the EC2 Security Groups that are associated with the EFS Mount Target.
- Subnet
Arn string Amazon Resource Name (ARN) of the EC2 Subnet that is associated with the EFS Mount Target.
- Security
Group []stringArns List of Amazon Resource Names (ARNs) of the EC2 Security Groups that are associated with the EFS Mount Target.
- Subnet
Arn string Amazon Resource Name (ARN) of the EC2 Subnet that is associated with the EFS Mount Target.
- security
Group List<String>Arns List of Amazon Resource Names (ARNs) of the EC2 Security Groups that are associated with the EFS Mount Target.
- subnet
Arn String Amazon Resource Name (ARN) of the EC2 Subnet that is associated with the EFS Mount Target.
- security
Group string[]Arns List of Amazon Resource Names (ARNs) of the EC2 Security Groups that are associated with the EFS Mount Target.
- subnet
Arn string Amazon Resource Name (ARN) of the EC2 Subnet that is associated with the EFS Mount Target.
- security_
group_ Sequence[str]arns 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.
- security
Group List<String>Arns List of Amazon Resource Names (ARNs) of the EC2 Security Groups that are associated with the EFS Mount Target.
- subnet
Arn String Amazon Resource Name (ARN) of the EC2 Subnet that is associated with the EFS Mount Target.
Import
Using pulumi import
, import aws_datasync_location_efs
using the DataSync Task Amazon Resource Name (ARN). For example:
$ 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.
Try AWS Native preview for resources not in the classic version.