Mount Target
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,
});
Content copied to clipboard
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)
Content copied to clipboard
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,
});
});
Content copied to clipboard
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
})
}
Content copied to clipboard
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());
}
}
Content copied to clipboard
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
Content copied to clipboard
Import
Using pulumi import
, import the EFS mount targets using the id
. For example:
$ pulumi import aws:efs/mountTarget:MountTarget alpha fsmt-52a643fb
Content copied to clipboard
Properties
Link copied to clipboard
The unique and consistent identifier of the Availability Zone (AZ) that the mount target resides in.
Link copied to clipboard
The name of the Availability Zone (AZ) that the mount target resides in.
Link copied to clipboard
Amazon Resource Name of the file system.
Link copied to clipboard
The ID of the file system for which the mount target is intended.
Link copied to clipboard
The DNS name for the given subnet/AZ per documented convention.
Link copied to clipboard
The ID of the network interface that Amazon EFS created when it created the mount target.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
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.