FileSystem
Provides an Elastic File System (EFS) File System resource.
Example Usage
EFS File System w/ tags
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var foo = new Aws.Efs.FileSystem("foo", new Aws.Efs.FileSystemArgs
{
Tags =
{
{ "Name", "MyProduct" },
},
});
}
}
package main
import (
"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 {
_, err := efs.NewFileSystem(ctx, "foo", &efs.FileSystemArgs{
Tags: pulumi.StringMap{
"Name": pulumi.String("MyProduct"),
},
})
if err != nil {
return err
}
return nil
})
}import pulumi
import pulumi_aws as aws
foo = aws.efs.FileSystem("foo", tags={
"Name": "MyProduct",
})import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const foo = new aws.efs.FileSystem("foo", {
tags: {
Name: "MyProduct",
},
});Using lifecycle policy
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var fooWithLifecylePolicy = new Aws.Efs.FileSystem("fooWithLifecylePolicy", new Aws.Efs.FileSystemArgs
{
LifecyclePolicy = new Aws.Efs.Inputs.FileSystemLifecyclePolicyArgs
{
TransitionToIa = "AFTER_30_DAYS",
},
});
}
}
package main
import (
"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 {
_, err := efs.NewFileSystem(ctx, "fooWithLifecylePolicy", &efs.FileSystemArgs{
LifecyclePolicy: &efs.FileSystemLifecyclePolicyArgs{
TransitionToIa: pulumi.String("AFTER_30_DAYS"),
},
})
if err != nil {
return err
}
return nil
})
}import pulumi
import pulumi_aws as aws
foo_with_lifecyle_policy = aws.efs.FileSystem("fooWithLifecylePolicy", lifecycle_policy={
"transitionToIa": "AFTER_30_DAYS",
})import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const fooWithLifecylePolicy = new aws.efs.FileSystem("foo_with_lifecyle_policy", {
lifecyclePolicy: {
transitionToIa: "AFTER_30_DAYS",
},
});Create a FileSystem Resource
new FileSystem(name: string, args?: FileSystemArgs, opts?: CustomResourceOptions);def FileSystem(resource_name, opts=None, creation_token=None, encrypted=None, kms_key_id=None, lifecycle_policy=None, performance_mode=None, provisioned_throughput_in_mibps=None, tags=None, throughput_mode=None, __props__=None);func NewFileSystem(ctx *Context, name string, args *FileSystemArgs, opts ...ResourceOption) (*FileSystem, error)public FileSystem(string name, FileSystemArgs? args = null, CustomResourceOptions? opts = null)- name string
- The unique name of the resource.
- args FileSystemArgs
- 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 FileSystemArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args FileSystemArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
FileSystem Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The FileSystem resource accepts the following input properties:
- Creation
Token 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.
- Encrypted bool
If true, the disk will be encrypted.
- Kms
Key stringId The ARN for the KMS encryption key. When specifying kms_key_id, encrypted needs to be set to true.
- Lifecycle
Policy FileSystem Lifecycle Policy Args A file system lifecycle policy object (documented below).
- Performance
Mode string The file system performance mode. Can be either
"generalPurpose"or"maxIO"(Default:"generalPurpose").- Provisioned
Throughput doubleIn Mibps The throughput, measured in MiB/s, that you want to provision for the file system. Only applicable with
throughput_modeset toprovisioned.- Dictionary<string, string>
A map of tags to assign to the file system.
- Throughput
Mode string Throughput mode for the file system. Defaults to
bursting. Valid values:bursting,provisioned. When usingprovisioned, also setprovisioned_throughput_in_mibps.
- Creation
Token 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.
- Encrypted bool
If true, the disk will be encrypted.
- Kms
Key stringId The ARN for the KMS encryption key. When specifying kms_key_id, encrypted needs to be set to true.
- Lifecycle
Policy FileSystem Lifecycle Policy A file system lifecycle policy object (documented below).
- Performance
Mode string The file system performance mode. Can be either
"generalPurpose"or"maxIO"(Default:"generalPurpose").- Provisioned
Throughput float64In Mibps The throughput, measured in MiB/s, that you want to provision for the file system. Only applicable with
throughput_modeset toprovisioned.- map[string]string
A map of tags to assign to the file system.
- Throughput
Mode string Throughput mode for the file system. Defaults to
bursting. Valid values:bursting,provisioned. When usingprovisioned, also setprovisioned_throughput_in_mibps.
- creation
Token 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.
- encrypted boolean
If true, the disk will be encrypted.
- kms
Key stringId The ARN for the KMS encryption key. When specifying kms_key_id, encrypted needs to be set to true.
- lifecycle
Policy FileSystem Lifecycle Policy A file system lifecycle policy object (documented below).
- performance
Mode string The file system performance mode. Can be either
"generalPurpose"or"maxIO"(Default:"generalPurpose").- provisioned
Throughput numberIn Mibps The throughput, measured in MiB/s, that you want to provision for the file system. Only applicable with
throughput_modeset toprovisioned.- {[key: string]: string}
A map of tags to assign to the file system.
- throughput
Mode string Throughput mode for the file system. Defaults to
bursting. Valid values:bursting,provisioned. When usingprovisioned, also setprovisioned_throughput_in_mibps.
- creation_
token str 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.
- encrypted bool
If true, the disk will be encrypted.
- kms_
key_ strid The ARN for the KMS encryption key. When specifying kms_key_id, encrypted needs to be set to true.
- lifecycle_
policy Dict[FileSystem Lifecycle Policy] A file system lifecycle policy object (documented below).
- performance_
mode str The file system performance mode. Can be either
"generalPurpose"or"maxIO"(Default:"generalPurpose").- provisioned_
throughput_ floatin_ mibps The throughput, measured in MiB/s, that you want to provision for the file system. Only applicable with
throughput_modeset toprovisioned.- Dict[str, str]
A map of tags to assign to the file system.
- throughput_
mode str Throughput mode for the file system. Defaults to
bursting. Valid values:bursting,provisioned. When usingprovisioned, also setprovisioned_throughput_in_mibps.
Outputs
All input properties are implicitly available as output properties. Additionally, the FileSystem resource produces the following output properties:
Look up an Existing FileSystem Resource
Get an existing FileSystem 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?: FileSystemState, opts?: CustomResourceOptions): FileSystemstatic get(resource_name, id, opts=None, arn=None, creation_token=None, dns_name=None, encrypted=None, kms_key_id=None, lifecycle_policy=None, performance_mode=None, provisioned_throughput_in_mibps=None, tags=None, throughput_mode=None, __props__=None);func GetFileSystem(ctx *Context, name string, id IDInput, state *FileSystemState, opts ...ResourceOption) (*FileSystem, error)public static FileSystem Get(string name, Input<string> id, FileSystemState? 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:
- Arn string
Amazon Resource Name of the file system.
- Creation
Token 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.
- Dns
Name string The DNS name for the filesystem per documented convention.
- Encrypted bool
If true, the disk will be encrypted.
- Kms
Key stringId The ARN for the KMS encryption key. When specifying kms_key_id, encrypted needs to be set to true.
- Lifecycle
Policy FileSystem Lifecycle Policy Args A file system lifecycle policy object (documented below).
- Performance
Mode string The file system performance mode. Can be either
"generalPurpose"or"maxIO"(Default:"generalPurpose").- Provisioned
Throughput doubleIn Mibps The throughput, measured in MiB/s, that you want to provision for the file system. Only applicable with
throughput_modeset toprovisioned.- Dictionary<string, string>
A map of tags to assign to the file system.
- Throughput
Mode string Throughput mode for the file system. Defaults to
bursting. Valid values:bursting,provisioned. When usingprovisioned, also setprovisioned_throughput_in_mibps.
- Arn string
Amazon Resource Name of the file system.
- Creation
Token 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.
- Dns
Name string The DNS name for the filesystem per documented convention.
- Encrypted bool
If true, the disk will be encrypted.
- Kms
Key stringId The ARN for the KMS encryption key. When specifying kms_key_id, encrypted needs to be set to true.
- Lifecycle
Policy FileSystem Lifecycle Policy A file system lifecycle policy object (documented below).
- Performance
Mode string The file system performance mode. Can be either
"generalPurpose"or"maxIO"(Default:"generalPurpose").- Provisioned
Throughput float64In Mibps The throughput, measured in MiB/s, that you want to provision for the file system. Only applicable with
throughput_modeset toprovisioned.- map[string]string
A map of tags to assign to the file system.
- Throughput
Mode string Throughput mode for the file system. Defaults to
bursting. Valid values:bursting,provisioned. When usingprovisioned, also setprovisioned_throughput_in_mibps.
- arn string
Amazon Resource Name of the file system.
- creation
Token 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.
- dns
Name string The DNS name for the filesystem per documented convention.
- encrypted boolean
If true, the disk will be encrypted.
- kms
Key stringId The ARN for the KMS encryption key. When specifying kms_key_id, encrypted needs to be set to true.
- lifecycle
Policy FileSystem Lifecycle Policy A file system lifecycle policy object (documented below).
- performance
Mode string The file system performance mode. Can be either
"generalPurpose"or"maxIO"(Default:"generalPurpose").- provisioned
Throughput numberIn Mibps The throughput, measured in MiB/s, that you want to provision for the file system. Only applicable with
throughput_modeset toprovisioned.- {[key: string]: string}
A map of tags to assign to the file system.
- throughput
Mode string Throughput mode for the file system. Defaults to
bursting. Valid values:bursting,provisioned. When usingprovisioned, also setprovisioned_throughput_in_mibps.
- arn str
Amazon Resource Name of the file system.
- creation_
token str 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.
- dns_
name str The DNS name for the filesystem per documented convention.
- encrypted bool
If true, the disk will be encrypted.
- kms_
key_ strid The ARN for the KMS encryption key. When specifying kms_key_id, encrypted needs to be set to true.
- lifecycle_
policy Dict[FileSystem Lifecycle Policy] A file system lifecycle policy object (documented below).
- performance_
mode str The file system performance mode. Can be either
"generalPurpose"or"maxIO"(Default:"generalPurpose").- provisioned_
throughput_ floatin_ mibps The throughput, measured in MiB/s, that you want to provision for the file system. Only applicable with
throughput_modeset toprovisioned.- Dict[str, str]
A map of tags to assign to the file system.
- throughput_
mode str Throughput mode for the file system. Defaults to
bursting. Valid values:bursting,provisioned. When usingprovisioned, also setprovisioned_throughput_in_mibps.
Supporting Types
FileSystemLifecyclePolicy
- Transition
To stringIa Indicates how long it takes to transition files to the IA storage class. Valid values:
AFTER_7_DAYS,AFTER_14_DAYS,AFTER_30_DAYS,AFTER_60_DAYS, orAFTER_90_DAYS.
- Transition
To stringIa Indicates how long it takes to transition files to the IA storage class. Valid values:
AFTER_7_DAYS,AFTER_14_DAYS,AFTER_30_DAYS,AFTER_60_DAYS, orAFTER_90_DAYS.
- transition
To stringIa Indicates how long it takes to transition files to the IA storage class. Valid values:
AFTER_7_DAYS,AFTER_14_DAYS,AFTER_30_DAYS,AFTER_60_DAYS, orAFTER_90_DAYS.
- transition
To strIa Indicates how long it takes to transition files to the IA storage class. Valid values:
AFTER_7_DAYS,AFTER_14_DAYS,AFTER_30_DAYS,AFTER_60_DAYS, orAFTER_90_DAYS.
Package Details
- Repository
- https://github.com/pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
awsTerraform Provider.