aws.efs.MountTarget
Explore with Pulumi AI
Provides an Elastic File System (EFS) mount target.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const foo = new aws.ec2.Vpc("foo", {cidrBlock: "10.0.0.0/16"});
const alphaSubnet = new aws.ec2.Subnet("alpha", {
vpcId: foo.id,
availabilityZone: "us-west-2a",
cidrBlock: "10.0.1.0/24",
});
const alpha = new aws.efs.MountTarget("alpha", {
fileSystemId: fooAwsEfsFileSystem.id,
subnetId: alphaSubnet.id,
});
import pulumi
import pulumi_aws as aws
foo = aws.ec2.Vpc("foo", cidr_block="10.0.0.0/16")
alpha_subnet = aws.ec2.Subnet("alpha",
vpc_id=foo.id,
availability_zone="us-west-2a",
cidr_block="10.0.1.0/24")
alpha = aws.efs.MountTarget("alpha",
file_system_id=foo_aws_efs_file_system["id"],
subnet_id=alpha_subnet.id)
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2"
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/efs"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
foo, err := ec2.NewVpc(ctx, "foo", &ec2.VpcArgs{
CidrBlock: pulumi.String("10.0.0.0/16"),
})
if err != nil {
return err
}
alphaSubnet, err := ec2.NewSubnet(ctx, "alpha", &ec2.SubnetArgs{
VpcId: foo.ID(),
AvailabilityZone: pulumi.String("us-west-2a"),
CidrBlock: pulumi.String("10.0.1.0/24"),
})
if err != nil {
return err
}
_, err = efs.NewMountTarget(ctx, "alpha", &efs.MountTargetArgs{
FileSystemId: pulumi.Any(fooAwsEfsFileSystem.Id),
SubnetId: alphaSubnet.ID(),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var foo = new Aws.Ec2.Vpc("foo", new()
{
CidrBlock = "10.0.0.0/16",
});
var alphaSubnet = new Aws.Ec2.Subnet("alpha", new()
{
VpcId = foo.Id,
AvailabilityZone = "us-west-2a",
CidrBlock = "10.0.1.0/24",
});
var alpha = new Aws.Efs.MountTarget("alpha", new()
{
FileSystemId = fooAwsEfsFileSystem.Id,
SubnetId = alphaSubnet.Id,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ec2.Vpc;
import com.pulumi.aws.ec2.VpcArgs;
import com.pulumi.aws.ec2.Subnet;
import com.pulumi.aws.ec2.SubnetArgs;
import com.pulumi.aws.efs.MountTarget;
import com.pulumi.aws.efs.MountTargetArgs;
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 foo = new Vpc("foo", VpcArgs.builder()
.cidrBlock("10.0.0.0/16")
.build());
var alphaSubnet = new Subnet("alphaSubnet", SubnetArgs.builder()
.vpcId(foo.id())
.availabilityZone("us-west-2a")
.cidrBlock("10.0.1.0/24")
.build());
var alpha = new MountTarget("alpha", MountTargetArgs.builder()
.fileSystemId(fooAwsEfsFileSystem.id())
.subnetId(alphaSubnet.id())
.build());
}
}
resources:
alpha:
type: aws:efs:MountTarget
properties:
fileSystemId: ${fooAwsEfsFileSystem.id}
subnetId: ${alphaSubnet.id}
foo:
type: aws:ec2:Vpc
properties:
cidrBlock: 10.0.0.0/16
alphaSubnet:
type: aws:ec2:Subnet
name: alpha
properties:
vpcId: ${foo.id}
availabilityZone: us-west-2a
cidrBlock: 10.0.1.0/24
Create MountTarget Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new MountTarget(name: string, args: MountTargetArgs, opts?: CustomResourceOptions);
@overload
def MountTarget(resource_name: str,
args: MountTargetArgs,
opts: Optional[ResourceOptions] = None)
@overload
def MountTarget(resource_name: str,
opts: Optional[ResourceOptions] = None,
file_system_id: Optional[str] = None,
subnet_id: Optional[str] = None,
ip_address: Optional[str] = None,
security_groups: Optional[Sequence[str]] = None)
func NewMountTarget(ctx *Context, name string, args MountTargetArgs, opts ...ResourceOption) (*MountTarget, error)
public MountTarget(string name, MountTargetArgs args, CustomResourceOptions? opts = null)
public MountTarget(String name, MountTargetArgs args)
public MountTarget(String name, MountTargetArgs args, CustomResourceOptions options)
type: aws:efs:MountTarget
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args MountTargetArgs
- 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 MountTargetArgs
- 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 MountTargetArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args MountTargetArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args MountTargetArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var mountTargetResource = new Aws.Efs.MountTarget("mountTargetResource", new()
{
FileSystemId = "string",
SubnetId = "string",
IpAddress = "string",
SecurityGroups = new[]
{
"string",
},
});
example, err := efs.NewMountTarget(ctx, "mountTargetResource", &efs.MountTargetArgs{
FileSystemId: pulumi.String("string"),
SubnetId: pulumi.String("string"),
IpAddress: pulumi.String("string"),
SecurityGroups: pulumi.StringArray{
pulumi.String("string"),
},
})
var mountTargetResource = new MountTarget("mountTargetResource", MountTargetArgs.builder()
.fileSystemId("string")
.subnetId("string")
.ipAddress("string")
.securityGroups("string")
.build());
mount_target_resource = aws.efs.MountTarget("mountTargetResource",
file_system_id="string",
subnet_id="string",
ip_address="string",
security_groups=["string"])
const mountTargetResource = new aws.efs.MountTarget("mountTargetResource", {
fileSystemId: "string",
subnetId: "string",
ipAddress: "string",
securityGroups: ["string"],
});
type: aws:efs:MountTarget
properties:
fileSystemId: string
ipAddress: string
securityGroups:
- string
subnetId: string
MountTarget Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The MountTarget resource accepts the following input properties:
- File
System stringId - The ID of the file system for which the mount target is intended.
- Subnet
Id string - The ID of the subnet to add the mount target in.
- Ip
Address string - The address (within the address range of the specified subnet) at which the file system may be mounted via the mount target.
- Security
Groups List<string> - A list of up to 5 VPC security group IDs (that must be for the same VPC as subnet specified) in effect for the mount target.
- File
System stringId - The ID of the file system for which the mount target is intended.
- Subnet
Id string - The ID of the subnet to add the mount target in.
- Ip
Address string - The address (within the address range of the specified subnet) at which the file system may be mounted via the mount target.
- Security
Groups []string - A list of up to 5 VPC security group IDs (that must be for the same VPC as subnet specified) in effect for the mount target.
- file
System StringId - The ID of the file system for which the mount target is intended.
- subnet
Id String - The ID of the subnet to add the mount target in.
- ip
Address String - The address (within the address range of the specified subnet) at which the file system may be mounted via the mount target.
- security
Groups List<String> - A list of up to 5 VPC security group IDs (that must be for the same VPC as subnet specified) in effect for the mount target.
- file
System stringId - The ID of the file system for which the mount target is intended.
- subnet
Id string - The ID of the subnet to add the mount target in.
- ip
Address string - The address (within the address range of the specified subnet) at which the file system may be mounted via the mount target.
- security
Groups string[] - A list of up to 5 VPC security group IDs (that must be for the same VPC as subnet specified) in effect for the mount target.
- file_
system_ strid - The ID of the file system for which the mount target is intended.
- subnet_
id str - The ID of the subnet to add the mount target in.
- ip_
address str - The address (within the address range of the specified subnet) at which the file system may be mounted via the mount target.
- security_
groups Sequence[str] - A list of up to 5 VPC security group IDs (that must be for the same VPC as subnet specified) in effect for the mount target.
- file
System StringId - The ID of the file system for which the mount target is intended.
- subnet
Id String - The ID of the subnet to add the mount target in.
- ip
Address String - The address (within the address range of the specified subnet) at which the file system may be mounted via the mount target.
- security
Groups List<String> - A list of up to 5 VPC security group IDs (that must be for the same VPC as subnet specified) in effect for the mount target.
Outputs
All input properties are implicitly available as output properties. Additionally, the MountTarget resource produces the following output properties:
- Availability
Zone stringId - The unique and consistent identifier of the Availability Zone (AZ) that the mount target resides in.
- Availability
Zone stringName - The name of the Availability Zone (AZ) that the mount target resides in.
- Dns
Name string - The DNS name for the EFS file system.
- File
System stringArn - Amazon Resource Name of the file system.
- Id string
- The provider-assigned unique ID for this managed resource.
- Mount
Target stringDns Name - The DNS name for the given subnet/AZ per documented convention.
- Network
Interface stringId - The ID of the network interface that Amazon EFS created when it created the mount target.
- Owner
Id string - AWS account ID that owns the resource.
- Availability
Zone stringId - The unique and consistent identifier of the Availability Zone (AZ) that the mount target resides in.
- Availability
Zone stringName - The name of the Availability Zone (AZ) that the mount target resides in.
- Dns
Name string - The DNS name for the EFS file system.
- File
System stringArn - Amazon Resource Name of the file system.
- Id string
- The provider-assigned unique ID for this managed resource.
- Mount
Target stringDns Name - The DNS name for the given subnet/AZ per documented convention.
- Network
Interface stringId - The ID of the network interface that Amazon EFS created when it created the mount target.
- Owner
Id string - AWS account ID that owns the resource.
- availability
Zone StringId - The unique and consistent identifier of the Availability Zone (AZ) that the mount target resides in.
- availability
Zone StringName - The name of the Availability Zone (AZ) that the mount target resides in.
- dns
Name String - The DNS name for the EFS file system.
- file
System StringArn - Amazon Resource Name of the file system.
- id String
- The provider-assigned unique ID for this managed resource.
- mount
Target StringDns Name - The DNS name for the given subnet/AZ per documented convention.
- network
Interface StringId - The ID of the network interface that Amazon EFS created when it created the mount target.
- owner
Id String - AWS account ID that owns the resource.
- availability
Zone stringId - The unique and consistent identifier of the Availability Zone (AZ) that the mount target resides in.
- availability
Zone stringName - The name of the Availability Zone (AZ) that the mount target resides in.
- dns
Name string - The DNS name for the EFS file system.
- file
System stringArn - Amazon Resource Name of the file system.
- id string
- The provider-assigned unique ID for this managed resource.
- mount
Target stringDns Name - The DNS name for the given subnet/AZ per documented convention.
- network
Interface stringId - The ID of the network interface that Amazon EFS created when it created the mount target.
- owner
Id string - AWS account ID that owns the resource.
- availability_
zone_ strid - The unique and consistent identifier of the Availability Zone (AZ) that the mount target resides in.
- availability_
zone_ strname - The name of the Availability Zone (AZ) that the mount target resides in.
- dns_
name str - The DNS name for the EFS file system.
- file_
system_ strarn - Amazon Resource Name of the file system.
- id str
- The provider-assigned unique ID for this managed resource.
- mount_
target_ strdns_ name - The DNS name for the given subnet/AZ per documented convention.
- network_
interface_ strid - The ID of the network interface that Amazon EFS created when it created the mount target.
- owner_
id str - AWS account ID that owns the resource.
- availability
Zone StringId - The unique and consistent identifier of the Availability Zone (AZ) that the mount target resides in.
- availability
Zone StringName - The name of the Availability Zone (AZ) that the mount target resides in.
- dns
Name String - The DNS name for the EFS file system.
- file
System StringArn - Amazon Resource Name of the file system.
- id String
- The provider-assigned unique ID for this managed resource.
- mount
Target StringDns Name - The DNS name for the given subnet/AZ per documented convention.
- network
Interface StringId - The ID of the network interface that Amazon EFS created when it created the mount target.
- owner
Id String - AWS account ID that owns the resource.
Look up Existing MountTarget Resource
Get an existing MountTarget 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?: MountTargetState, opts?: CustomResourceOptions): MountTarget
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
availability_zone_id: Optional[str] = None,
availability_zone_name: Optional[str] = None,
dns_name: Optional[str] = None,
file_system_arn: Optional[str] = None,
file_system_id: Optional[str] = None,
ip_address: Optional[str] = None,
mount_target_dns_name: Optional[str] = None,
network_interface_id: Optional[str] = None,
owner_id: Optional[str] = None,
security_groups: Optional[Sequence[str]] = None,
subnet_id: Optional[str] = None) -> MountTarget
func GetMountTarget(ctx *Context, name string, id IDInput, state *MountTargetState, opts ...ResourceOption) (*MountTarget, error)
public static MountTarget Get(string name, Input<string> id, MountTargetState? state, CustomResourceOptions? opts = null)
public static MountTarget get(String name, Output<String> id, MountTargetState 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.
- Availability
Zone stringId - The unique and consistent identifier of the Availability Zone (AZ) that the mount target resides in.
- Availability
Zone stringName - The name of the Availability Zone (AZ) that the mount target resides in.
- Dns
Name string - The DNS name for the EFS file system.
- File
System stringArn - Amazon Resource Name of the file system.
- File
System stringId - The ID of the file system for which the mount target is intended.
- Ip
Address string - The address (within the address range of the specified subnet) at which the file system may be mounted via the mount target.
- Mount
Target stringDns Name - The DNS name for the given subnet/AZ per documented convention.
- Network
Interface stringId - The ID of the network interface that Amazon EFS created when it created the mount target.
- Owner
Id string - AWS account ID that owns the resource.
- Security
Groups List<string> - A list of up to 5 VPC security group IDs (that must be for the same VPC as subnet specified) in effect for the mount target.
- Subnet
Id string - The ID of the subnet to add the mount target in.
- Availability
Zone stringId - The unique and consistent identifier of the Availability Zone (AZ) that the mount target resides in.
- Availability
Zone stringName - The name of the Availability Zone (AZ) that the mount target resides in.
- Dns
Name string - The DNS name for the EFS file system.
- File
System stringArn - Amazon Resource Name of the file system.
- File
System stringId - The ID of the file system for which the mount target is intended.
- Ip
Address string - The address (within the address range of the specified subnet) at which the file system may be mounted via the mount target.
- Mount
Target stringDns Name - The DNS name for the given subnet/AZ per documented convention.
- Network
Interface stringId - The ID of the network interface that Amazon EFS created when it created the mount target.
- Owner
Id string - AWS account ID that owns the resource.
- Security
Groups []string - A list of up to 5 VPC security group IDs (that must be for the same VPC as subnet specified) in effect for the mount target.
- Subnet
Id string - The ID of the subnet to add the mount target in.
- availability
Zone StringId - The unique and consistent identifier of the Availability Zone (AZ) that the mount target resides in.
- availability
Zone StringName - The name of the Availability Zone (AZ) that the mount target resides in.
- dns
Name String - The DNS name for the EFS file system.
- file
System StringArn - Amazon Resource Name of the file system.
- file
System StringId - The ID of the file system for which the mount target is intended.
- ip
Address String - The address (within the address range of the specified subnet) at which the file system may be mounted via the mount target.
- mount
Target StringDns Name - The DNS name for the given subnet/AZ per documented convention.
- network
Interface StringId - The ID of the network interface that Amazon EFS created when it created the mount target.
- owner
Id String - AWS account ID that owns the resource.
- security
Groups List<String> - A list of up to 5 VPC security group IDs (that must be for the same VPC as subnet specified) in effect for the mount target.
- subnet
Id String - The ID of the subnet to add the mount target in.
- availability
Zone stringId - The unique and consistent identifier of the Availability Zone (AZ) that the mount target resides in.
- availability
Zone stringName - The name of the Availability Zone (AZ) that the mount target resides in.
- dns
Name string - The DNS name for the EFS file system.
- file
System stringArn - Amazon Resource Name of the file system.
- file
System stringId - The ID of the file system for which the mount target is intended.
- ip
Address string - The address (within the address range of the specified subnet) at which the file system may be mounted via the mount target.
- mount
Target stringDns Name - The DNS name for the given subnet/AZ per documented convention.
- network
Interface stringId - The ID of the network interface that Amazon EFS created when it created the mount target.
- owner
Id string - AWS account ID that owns the resource.
- security
Groups string[] - A list of up to 5 VPC security group IDs (that must be for the same VPC as subnet specified) in effect for the mount target.
- subnet
Id string - The ID of the subnet to add the mount target in.
- availability_
zone_ strid - The unique and consistent identifier of the Availability Zone (AZ) that the mount target resides in.
- availability_
zone_ strname - The name of the Availability Zone (AZ) that the mount target resides in.
- dns_
name str - The DNS name for the EFS file system.
- file_
system_ strarn - Amazon Resource Name of the file system.
- file_
system_ strid - The ID of the file system for which the mount target is intended.
- ip_
address str - The address (within the address range of the specified subnet) at which the file system may be mounted via the mount target.
- mount_
target_ strdns_ name - The DNS name for the given subnet/AZ per documented convention.
- network_
interface_ strid - The ID of the network interface that Amazon EFS created when it created the mount target.
- owner_
id str - AWS account ID that owns the resource.
- security_
groups Sequence[str] - A list of up to 5 VPC security group IDs (that must be for the same VPC as subnet specified) in effect for the mount target.
- subnet_
id str - The ID of the subnet to add the mount target in.
- availability
Zone StringId - The unique and consistent identifier of the Availability Zone (AZ) that the mount target resides in.
- availability
Zone StringName - The name of the Availability Zone (AZ) that the mount target resides in.
- dns
Name String - The DNS name for the EFS file system.
- file
System StringArn - Amazon Resource Name of the file system.
- file
System StringId - The ID of the file system for which the mount target is intended.
- ip
Address String - The address (within the address range of the specified subnet) at which the file system may be mounted via the mount target.
- mount
Target StringDns Name - The DNS name for the given subnet/AZ per documented convention.
- network
Interface StringId - The ID of the network interface that Amazon EFS created when it created the mount target.
- owner
Id String - AWS account ID that owns the resource.
- security
Groups List<String> - A list of up to 5 VPC security group IDs (that must be for the same VPC as subnet specified) in effect for the mount target.
- subnet
Id String - The ID of the subnet to add the mount target in.
Import
Using pulumi import
, import the EFS mount targets using the id
. For example:
$ pulumi import aws:efs/mountTarget:MountTarget alpha fsmt-52a643fb
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
aws
Terraform Provider.