Resource: awsEfsFileSystem
Provides an Elastic File System (EFS) File System resource.
Example Usage
EFS File System w/ tags
/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
new aws.efsFileSystem.EfsFileSystem(this, "foo", {
creationToken: "my-product",
tags: {
Name: "MyProduct",
},
});
Using lifecycle policy
/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
new aws.efsFileSystem.EfsFileSystem(this, "foo_with_lifecyle_policy", {
creationToken: "my-product",
lifecyclePolicy: [
{
transitionToIa: "AFTER_30_DAYS",
},
],
});
Argument Reference
The following arguments are supported:
availabilityZoneName
- (Optional) 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.creationToken
- (Optional) 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 Terraform. See Elastic File System user guide for more information.encrypted
- (Optional) If true, the disk will be encrypted.kmsKeyId
- (Optional) The ARN for the KMS encryption key. When specifying kms_key_id, encrypted needs to be set to true.lifecyclePolicy
- (Optional) A file system lifecycle policy object (documented below).performanceMode
- (Optional) The file system performance mode. Can be either"generalPurpose"
or"maxIo"
(Default:"generalPurpose"
).provisionedThroughputInMibps
- (Optional) The throughput, measured in MiB/s, that you want to provision for the file system. Only applicable withthroughputMode
set toprovisioned
.tags
- (Optional) A map of tags to assign to the file system. If configured with a providerdefaultTags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.throughputMode
- (Optional) Throughput mode for the file system. Defaults tobursting
. Valid values:bursting
,provisioned
, orelastic
. When usingprovisioned
, also setprovisionedThroughputInMibps
.
Lifecycle Policy Arguments
For lifecycle_policy the following attributes are supported:
transitionToIa
- (Optional) Indicates how long it takes to transition files to the IA storage class. Valid values:AFTER_1_DAY
,AFTER_7_DAYS
,AFTER_14_DAYS
,AFTER_30_DAYS
,AFTER_60_DAYS
, orAFTER_90_DAYS
.transitionToPrimaryStorageClass
- (Optional) Describes the policy used to transition a file from infequent access storage to primary storage. Valid values:AFTER_1_ACCESS
.
Attributes Reference
In addition to all arguments above, the following attributes are exported:
arn
- Amazon Resource Name of the file system.availabilityZoneId
- The identifier of the Availability Zone in which the file system's One Zone storage classes exist.id
- The ID that identifies the file system (e.g., fs-ccfc0d65).dnsName
- The DNS name for the filesystem per documented convention.ownerId
- 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.numberOfMountTargets
- The current number of mount targets that the file system has.sizeInBytes
- 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.tagsAll
- A map of tags assigned to the resource, including those inherited from the providerdefaultTags
configuration block.
Size In Bytes
value
- The latest known metered size (in bytes) of data stored in the file system.valueInIa
- The latest known metered size (in bytes) of data stored in the Infrequent Access storage class.valueInStandard
- The latest known metered size (in bytes) of data stored in the Standard storage class.
Import
The EFS file systems can be imported using the id
, e.g.,