Welcome to Pulumi Registry, your window into the cloud. Read the announcement.

AWS Classic

v4.25.0 published on Friday, Oct 15, 2021 by Pulumi

MountTarget

Provides an Elastic File System (EFS) mount target.

Example Usage

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var foo = new Aws.Ec2.Vpc("foo", new Aws.Ec2.VpcArgs
        {
            CidrBlock = "10.0.0.0/16",
        });
        var alphaSubnet = new Aws.Ec2.Subnet("alphaSubnet", new Aws.Ec2.SubnetArgs
        {
            VpcId = foo.Id,
            AvailabilityZone = "us-west-2a",
            CidrBlock = "10.0.1.0/24",
        });
        var alphaMountTarget = new Aws.Efs.MountTarget("alphaMountTarget", new Aws.Efs.MountTargetArgs
        {
            FileSystemId = aws_efs_file_system.Foo.Id,
            SubnetId = alphaSubnet.Id,
        });
    }

}
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v4/go/aws/ec2"
	"github.com/pulumi/pulumi-aws/sdk/v4/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, "alphaSubnet", &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, "alphaMountTarget", &efs.MountTargetArgs{
			FileSystemId: pulumi.Any(aws_efs_file_system.Foo.Id),
			SubnetId:     alphaSubnet.ID(),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
import pulumi
import pulumi_aws as aws

foo = aws.ec2.Vpc("foo", cidr_block="10.0.0.0/16")
alpha_subnet = aws.ec2.Subnet("alphaSubnet",
    vpc_id=foo.id,
    availability_zone="us-west-2a",
    cidr_block="10.0.1.0/24")
alpha_mount_target = aws.efs.MountTarget("alphaMountTarget",
    file_system_id=aws_efs_file_system["foo"]["id"],
    subnet_id=alpha_subnet.id)
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("alphaSubnet", {
    vpcId: foo.id,
    availabilityZone: "us-west-2a",
    cidrBlock: "10.0.1.0/24",
});
const alphaMountTarget = new aws.efs.MountTarget("alphaMountTarget", {
    fileSystemId: aws_efs_file_system.foo.id,
    subnetId: alphaSubnet.id,
});

Create a MountTarget Resource

new MountTarget(name: string, args: MountTargetArgs, opts?: CustomResourceOptions);
@overload
def MountTarget(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                file_system_id: Optional[str] = None,
                ip_address: Optional[str] = None,
                security_groups: Optional[Sequence[str]] = None,
                subnet_id: Optional[str] = None)
@overload
def MountTarget(resource_name: str,
                args: MountTargetArgs,
                opts: Optional[ResourceOptions] = None)
func NewMountTarget(ctx *Context, name string, args MountTargetArgs, opts ...ResourceOption) (*MountTarget, error)
public MountTarget(string name, MountTargetArgs args, CustomResourceOptions? opts = null)
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.

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

The MountTarget resource accepts the following input properties:

FileSystemId string
The ID of the file system for which the mount target is intended.
SubnetId string
The ID of the subnet to add the mount target in.
IpAddress string
The address (within the address range of the specified subnet) at which the file system may be mounted via the mount target.
SecurityGroups 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.
FileSystemId string
The ID of the file system for which the mount target is intended.
SubnetId string
The ID of the subnet to add the mount target in.
IpAddress string
The address (within the address range of the specified subnet) at which the file system may be mounted via the mount target.
SecurityGroups []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.
fileSystemId string
The ID of the file system for which the mount target is intended.
subnetId string
The ID of the subnet to add the mount target in.
ipAddress string
The address (within the address range of the specified subnet) at which the file system may be mounted via the mount target.
securityGroups 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_id str
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.

Outputs

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

AvailabilityZoneId string
The unique and consistent identifier of the Availability Zone (AZ) that the mount target resides in.
AvailabilityZoneName string
The name of the Availability Zone (AZ) that the mount target resides in.
DnsName string
The DNS name for the EFS file system.
FileSystemArn string
Amazon Resource Name of the file system.
Id string
The provider-assigned unique ID for this managed resource.
MountTargetDnsName string
The DNS name for the given subnet/AZ per documented convention.
NetworkInterfaceId string
The ID of the network interface that Amazon EFS created when it created the mount target.
OwnerId string
AWS account ID that owns the resource.
AvailabilityZoneId string
The unique and consistent identifier of the Availability Zone (AZ) that the mount target resides in.
AvailabilityZoneName string
The name of the Availability Zone (AZ) that the mount target resides in.
DnsName string
The DNS name for the EFS file system.
FileSystemArn string
Amazon Resource Name of the file system.
Id string
The provider-assigned unique ID for this managed resource.
MountTargetDnsName string
The DNS name for the given subnet/AZ per documented convention.
NetworkInterfaceId string
The ID of the network interface that Amazon EFS created when it created the mount target.
OwnerId string
AWS account ID that owns the resource.
availabilityZoneId string
The unique and consistent identifier of the Availability Zone (AZ) that the mount target resides in.
availabilityZoneName string
The name of the Availability Zone (AZ) that the mount target resides in.
dnsName string
The DNS name for the EFS file system.
fileSystemArn string
Amazon Resource Name of the file system.
id string
The provider-assigned unique ID for this managed resource.
mountTargetDnsName string
The DNS name for the given subnet/AZ per documented convention.
networkInterfaceId string
The ID of the network interface that Amazon EFS created when it created the mount target.
ownerId string
AWS account ID that owns the resource.
availability_zone_id str
The unique and consistent identifier of the Availability Zone (AZ) that the mount target resides in.
availability_zone_name str
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_arn str
Amazon Resource Name of the file system.
id str
The provider-assigned unique ID for this managed resource.
mount_target_dns_name str
The DNS name for the given subnet/AZ per documented convention.
network_interface_id str
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.

Look up an 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)
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.

The following state arguments are supported:

AvailabilityZoneId string
The unique and consistent identifier of the Availability Zone (AZ) that the mount target resides in.
AvailabilityZoneName string
The name of the Availability Zone (AZ) that the mount target resides in.
DnsName string
The DNS name for the EFS file system.
FileSystemArn string
Amazon Resource Name of the file system.
FileSystemId string
The ID of the file system for which the mount target is intended.
IpAddress string
The address (within the address range of the specified subnet) at which the file system may be mounted via the mount target.
MountTargetDnsName string
The DNS name for the given subnet/AZ per documented convention.
NetworkInterfaceId string
The ID of the network interface that Amazon EFS created when it created the mount target.
OwnerId string
AWS account ID that owns the resource.
SecurityGroups 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.
SubnetId string
The ID of the subnet to add the mount target in.
AvailabilityZoneId string
The unique and consistent identifier of the Availability Zone (AZ) that the mount target resides in.
AvailabilityZoneName string
The name of the Availability Zone (AZ) that the mount target resides in.
DnsName string
The DNS name for the EFS file system.
FileSystemArn string
Amazon Resource Name of the file system.
FileSystemId string
The ID of the file system for which the mount target is intended.
IpAddress string
The address (within the address range of the specified subnet) at which the file system may be mounted via the mount target.
MountTargetDnsName string
The DNS name for the given subnet/AZ per documented convention.
NetworkInterfaceId string
The ID of the network interface that Amazon EFS created when it created the mount target.
OwnerId string
AWS account ID that owns the resource.
SecurityGroups []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.
SubnetId string
The ID of the subnet to add the mount target in.
availabilityZoneId string
The unique and consistent identifier of the Availability Zone (AZ) that the mount target resides in.
availabilityZoneName string
The name of the Availability Zone (AZ) that the mount target resides in.
dnsName string
The DNS name for the EFS file system.
fileSystemArn string
Amazon Resource Name of the file system.
fileSystemId string
The ID of the file system for which the mount target is intended.
ipAddress string
The address (within the address range of the specified subnet) at which the file system may be mounted via the mount target.
mountTargetDnsName string
The DNS name for the given subnet/AZ per documented convention.
networkInterfaceId string
The ID of the network interface that Amazon EFS created when it created the mount target.
ownerId string
AWS account ID that owns the resource.
securityGroups 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.
subnetId string
The ID of the subnet to add the mount target in.
availability_zone_id str
The unique and consistent identifier of the Availability Zone (AZ) that the mount target resides in.
availability_zone_name str
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_arn str
Amazon Resource Name of the file system.
file_system_id str
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_dns_name str
The DNS name for the given subnet/AZ per documented convention.
network_interface_id str
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.

Import

The EFS mount targets can be imported using the id, e.g.

 $ pulumi import aws:efs/mountTarget:MountTarget alpha fsmt-52a643fb

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.