MountTarget class
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)
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 main
import (
"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/ec2"
"github.com/pulumi/pulumi-aws/sdk/v7/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().ToIDOutput().ToStringOutput(),
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().ToIDOutput().ToStringOutput(),
})
if err != nil {
return err
}
return nil
})
}
pulumi {
required_providers {
aws = {
source = "pulumi/aws"
}
}
}
resource "aws_efs_mounttarget" "alpha" {
file_system_id = fooAwsEfsFileSystem.id
subnet_id = aws_ec2_subnet.alpha.id
}
resource "aws_ec2_vpc" "foo" {
cidr_block = "10.0.0.0/16"
}
resource "aws_ec2_subnet" "alpha" {
vpc_id = aws_ec2_vpc.foo.id
availability_zone = "us-west-2a"
cidr_block = "10.0.1.0/24"
}
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.ArrayList;
import java.util.Arrays;
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
Import
Using pulumi import, import the EFS mount targets using the id. For example:
$ pulumi import aws:efs/mountTarget:MountTarget alpha fsmt-52a643fb
Constructors
- MountTarget(String name, {MountTargetArgs? args, CustomResourceOptions? options})
-
Creates a new MountTarget.
nameThe Pulumi resource name.argsArguments used to configure this MountTarget. The set of arguments for MountTarget.optionsResource options controlling this resource's behavior. - MountTarget.reference(String urn)
- Creates a typed reference to an existing MountTarget resource.
Properties
-
availabilityZoneId
↔ Output<
String> -
The unique and consistent identifier of the Availability Zone (AZ) that the mount target resides in.
latefinal
-
availabilityZoneName
↔ Output<
String> -
The name of the Availability Zone (AZ) that the mount target resides in.
latefinal
-
childResources
→ Set<
Resource> -
finalinherited
-
completionSources
↔ Map<
String, IOutputCompletionSource> -
latefinalinherited
-
dnsName
↔ Output<
String> -
The DNS name for the EFS file system.
latefinal
-
fileSystemArn
↔ Output<
String> -
ARN of the file system.
latefinal
-
fileSystemId
↔ Output<
String> -
The ID of the file system for which the mount target is intended.
latefinal
- hashCode → int
-
The hash code for this object.
no setterinherited
-
id
↔ Output<
String> -
getter/setter pairinherited
-
ipAddress
↔ Output<
String> -
The address (within the address range of the specified subnet) at
which the file system may be mounted via the mount target.
latefinal
-
ipAddressType
↔ Output<
String> -
IP address type for the mount target. Valid values are
IPV4_ONLY(only IPv4 addresses),IPV6_ONLY(only IPv6 addresses), andDUAL_STACK(dual-stack, both IPv4 and IPv6 addresses). Defaults toIPV4_ONLY.latefinal -
ipv6Address
↔ Output<
String> -
IPv6 address to use. Valid only when
ipAddressTypeis set toIPV6_ONLYorDUAL_STACK.latefinal - isCustom → bool
-
Returns whether this resource is provider-managed.
no setterinherited
- isProtected → bool
-
Returns whether this resource is protected from deletion.
no setterinherited
- isRemote → bool
-
Whether this resource is registered as remote.
no setterinherited
- isResourceReference → bool
-
Whether this instance represents a resource value returned over RPC.
finalinherited
-
mountTargetDnsName
↔ Output<
String> -
The DNS name for the given subnet/AZ per documented convention.
latefinal
-
networkInterfaceId
↔ Output<
String> -
The ID of the network interface that Amazon EFS created when it created the mount target.
latefinal
-
ownerId
↔ Output<
String> -
AWS account ID that owns the resource.
latefinal
-
region
↔ Output<
String> -
Region where this resource will be managed. Defaults to the Region set in the provider configuration.
latefinal
-
resourceTransforms
→ List<
ResourceTransform> -
Inherited/explicit async transforms.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
securityGroups
↔ Output<
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.
latefinal
-
subnetId
↔ Output<
String> -
The ID of the subnet to add the mount target in.
latefinal
-
transformations
→ List<
ResourceTransformation> -
Inherited/explicit legacy transformations.
no setterinherited
-
urn
↔ Output<
String> -
latefinalinherited
Methods
-
failId(
Object error) → void -
Completes this resource ID with an error when registration fails.
inherited
-
failOutputs(
Object error) → void -
Completes all output properties with
error.inherited -
failUrn(
Object error) → void -
Completes this resource URN with an error when registration fails.
inherited
-
getProvider(
String moduleMember) → ProviderResource? -
Returns provider for
moduleMember's package, if configured.inherited -
getResourceName(
) → String -
Returns this resource's logical name.
inherited
-
getResourceType(
) → String -
Returns this resource's Pulumi type token.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
registerOutput<
T> (String propertyName, {Object? decoder(Object?)?, bool isSecret = false}) → Output< T> -
Registers a dynamic output property for this resource.
inherited
-
resolveId(
String? value, {required bool isKnown}) → void -
Resolves the provider-assigned ID for this resource.
inherited
-
resolveOutputs(
Struct outputs) → void -
Resolves all output properties from a monitor response payload.
inherited
-
resolveUrn(
String value) → void -
Resolves this resource's URN once assigned by the engine.
inherited
-
serializeProperties(
Map< String, dynamic> properties) → Future<Struct> -
Serializes resource properties for RPC transmission.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
get(
String name, Input< String> id, {MountTargetState? state, CustomResourceOptions? options}) → MountTarget -
Gets an existing MountTarget resource's state with the given
nameandid.