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
{
AvailabilityZone = "us-west-2a",
CidrBlock = "10.0.1.0/24",
VpcId = foo.Id,
});
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/v2/go/aws/ec2"
"github.com/pulumi/pulumi-aws/sdk/v2/go/aws/efs"
"github.com/pulumi/pulumi/sdk/v2/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{
AvailabilityZone: pulumi.String("us-west-2a"),
CidrBlock: pulumi.String("10.0.1.0/24"),
VpcId: foo.ID(),
})
if err != nil {
return err
}
_, err = efs.NewMountTarget(ctx, "alphaMountTarget", &efs.MountTargetArgs{
FileSystemId: pulumi.String(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",
availability_zone="us-west-2a",
cidr_block="10.0.1.0/24",
vpc_id=foo.id)
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("alpha", {
availabilityZone: "us-west-2a",
cidrBlock: "10.0.1.0/24",
vpcId: foo.id,
});
const alphaMountTarget = new aws.efs.MountTarget("alpha", {
fileSystemId: aws_efs_file_system_foo.id,
subnetId: alphaSubnet.id,
});Create a MountTarget Resource
new MountTarget(name: string, args: MountTargetArgs, opts?: CustomResourceOptions);def MountTarget(resource_name, opts=None, file_system_id=None, ip_address=None, security_groups=None, subnet_id=None, __props__=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.
- opts ResourceOptions
- A bag of options that control this 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 Programming Model docs.
Inputs
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 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 List[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:
- 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.
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): MountTargetstatic get(resource_name, id, opts=None, availability_zone_id=None, availability_zone_name=None, dns_name=None, file_system_arn=None, file_system_id=None, ip_address=None, mount_target_dns_name=None, network_interface_id=None, owner_id=None, security_groups=None, subnet_id=None, __props__=None);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:
- 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 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 List[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.
Package Details
- Repository
- https://github.com/pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
awsTerraform Provider.