FileSystem class

Provides an Elastic File System (EFS) File System resource.

Example Usage

EFS File System w/ tags

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const foo = new aws.efs.FileSystem("foo", {
    creationToken: "my-product",
    tags: {
        Name: "MyProduct",
    },
});
import pulumi
import pulumi_aws as aws

foo = aws.efs.FileSystem("foo",
    creation_token="my-product",
    tags={
        "Name": "MyProduct",
    })
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() =>
{
    var foo = new Aws.Efs.FileSystem("foo", new()
    {
        CreationToken = "my-product",
        Tags =
        {
            { "Name", "MyProduct" },
        },
    });

});
package main

import (
	"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 {
		_, err := efs.NewFileSystem(ctx, "foo", &efs.FileSystemArgs{
			CreationToken: pulumi.String("my-product"),
			Tags: pulumi.StringMap{
				"Name": pulumi.String("MyProduct"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
pulumi {
  required_providers {
    aws = {
      source = "pulumi/aws"
    }
  }
}

resource "aws_efs_filesystem" "foo" {
  creation_token = "my-product"
  tags = {
    "Name" = "MyProduct"
  }
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.efs.FileSystem;
import com.pulumi.aws.efs.FileSystemArgs;
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 FileSystem("foo", FileSystemArgs.builder()
            .creationToken("my-product")
            .tags(Map.of("Name", "MyProduct"))
            .build());

    }
}
resources:
  foo:
    type: aws:efs:FileSystem
    properties:
      creationToken: my-product
      tags:
        Name: MyProduct

Using lifecycle policy

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const fooWithLifecylePolicy = new aws.efs.FileSystem("foo_with_lifecyle_policy", {
    lifecyclePolicies: [{
        transitionToIa: "AFTER_30_DAYS",
    }],
    creationToken: "my-product",
});
import pulumi
import pulumi_aws as aws

foo_with_lifecyle_policy = aws.efs.FileSystem("foo_with_lifecyle_policy",
    lifecycle_policies=[{
        "transition_to_ia": "AFTER_30_DAYS",
    }],
    creation_token="my-product")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() =>
{
    var fooWithLifecylePolicy = new Aws.Efs.FileSystem("foo_with_lifecyle_policy", new()
    {
        LifecyclePolicies = new[]
        {
            new Aws.Efs.Inputs.FileSystemLifecyclePolicyArgs
            {
                TransitionToIa = "AFTER_30_DAYS",
            },
        },
        CreationToken = "my-product",
    });

});
package main

import (
	"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 {
		_, err := efs.NewFileSystem(ctx, "foo_with_lifecyle_policy", &efs.FileSystemArgs{
			LifecyclePolicies: efs.FileSystemLifecyclePolicyArray{
				&efs.FileSystemLifecyclePolicyArgs{
					TransitionToIa: pulumi.String("AFTER_30_DAYS"),
				},
			},
			CreationToken: pulumi.String("my-product"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
pulumi {
  required_providers {
    aws = {
      source = "pulumi/aws"
    }
  }
}

resource "aws_efs_filesystem" "foo_with_lifecyle_policy" {
  lifecycle_policies {
    transition_to_ia = "AFTER_30_DAYS"
  }
  creation_token = "my-product"
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.efs.FileSystem;
import com.pulumi.aws.efs.FileSystemArgs;
import com.pulumi.aws.efs.inputs.FileSystemLifecyclePolicyArgs;
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 fooWithLifecylePolicy = new FileSystem("fooWithLifecylePolicy", FileSystemArgs.builder()
            .lifecyclePolicies(FileSystemLifecyclePolicyArgs.builder()
                .transitionToIa("AFTER_30_DAYS")
                .build())
            .creationToken("my-product")
            .build());

    }
}
resources:
  fooWithLifecylePolicy:
    type: aws:efs:FileSystem
    name: foo_with_lifecyle_policy
    properties:
      lifecyclePolicies:
        - transitionToIa: AFTER_30_DAYS
      creationToken: my-product

Import

Using pulumi import, import the EFS file systems using the id. For example:

$ pulumi import aws:efs/fileSystem:FileSystem foo fs-6fa144c6

Constructors

FileSystem(String name, {FileSystemArgs? args, CustomResourceOptions? options})
Creates a new FileSystem. name The Pulumi resource name. args Arguments used to configure this FileSystem. The set of arguments for FileSystem. options Resource options controlling this resource's behavior.
FileSystem.reference(String urn)
Creates a typed reference to an existing FileSystem resource.

Properties

arn ↔ Output<String>
ARN of the file system.
latefinal
availabilityZoneId ↔ Output<String>
The identifier of the Availability Zone in which the file system's One Zone storage classes exist.
latefinal
availabilityZoneName ↔ Output<String>
the AWS Availability Zone in which to create the file system. Used to create a file system that uses One Zone storage classes. See user guide for more information.
latefinal
childResources → Set<Resource>
finalinherited
completionSources ↔ Map<String, IOutputCompletionSource>
latefinalinherited
creationToken ↔ Output<String>
A unique name (a maximum of 64 characters are allowed) used as reference when creating the Elastic File System to ensure idempotent file system creation. By default generated by this provider. See Elastic File System user guide for more information.
latefinal
dnsName ↔ Output<String>
The DNS name for the filesystem per documented convention.
latefinal
encrypted ↔ Output<bool>
If true, the disk will be encrypted.
latefinal
hashCode → int
The hash code for this object.
no setterinherited
id ↔ Output<String>
getter/setter pairinherited
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
kmsKeyId ↔ Output<String>
The ARN for the KMS encryption key. When specifying kms_key_id, encrypted needs to be set to true.
latefinal
lifecyclePolicies ↔ Output<List<FileSystemLifecyclePolicy>?>
A file system lifecycle policy object. See lifecyclePolicy block below for details.
latefinal
name ↔ Output<String>
The value of the file system's Name tag.
latefinal
numberOfMountTargets ↔ Output<int>
The current number of mount targets that the file system has.
latefinal
ownerId ↔ Output<String>
The AWS account that created the file system. If the file system was createdby an IAM user, the parent account to which the user belongs is the owner.
latefinal
performanceMode ↔ Output<String>
The file system performance mode. Can be either "generalPurpose" or "maxIO" (Default: "generalPurpose").
latefinal
protection ↔ Output<FileSystemProtection>
A file system protection object. See protection block below for details.
latefinal
provisionedThroughputInMibps ↔ Output<double?>
The throughput, measured in MiB/s, that you want to provision for the file system. Only applicable with throughputMode set to provisioned.
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
sizeInBytes ↔ Output<List<FileSystemSizeInByte>>
The latest known metered size (in bytes) of data stored in the file system, the value is not the exact size that the file system was at any point in time. See Size In Bytes.
latefinal
tags ↔ Output<Map<String, String>?>
A map of tags to assign to the file system. If configured with a provider defaultTags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
latefinal
tagsAll ↔ Output<Map<String, String>>
A map of tags assigned to the resource, including those inherited from the provider defaultTags configuration block.
latefinal
throughputMode ↔ Output<String?>
Throughput mode for the file system. Defaults to bursting, matching the CreateFileSystem API default. Note that AWS recommends elastic for most use cases, and elastic is the default in the Amazon EFS console. Valid values: bursting, provisioned, or elastic. When using provisioned, also set provisionedThroughputInMibps.
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, {FileSystemState? state, CustomResourceOptions? options}) → FileSystem
Gets an existing FileSystem resource's state with the given name and id.