Resource: awsFsxLustreFileSystem
Manages a FSx Lustre File System. See the FSx Lustre Guide for more information.
\~> NOTE: autoImportPolicy
, exportPath
, importPath
and importedFileChunkSize
are not supported with the PERSISTENT_2
deployment type. Use awsFsxDataRepositoryAssociation
instead.
Example Usage
/*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.fsxLustreFileSystem.FsxLustreFileSystem(this, "example", {
importPath: "s3://${aws_s3_bucket.example.bucket}",
storageCapacity: 1200,
subnetIds: ["${aws_subnet.example.id}"],
});
Argument Reference
The following arguments are supported:
storageCapacity
- (Optional) The storage capacity (GiB) of the file system. Minimum of1200
. See more details at Allowed values for Fsx storage capacity. Update is allowed only forSCRATCH_2
,PERSISTENT_1
andPERSISTENT_2
deployment types, See more details at Fsx Storage Capacity Update. Required when not creating filesystem for a backup.subnetIds
- (Required) A list of IDs for the subnets that the file system will be accessible from. File systems currently support only one subnet. The file server is also launched in that subnet's Availability Zone.backupId
- (Optional) The ID of the source backup to create the filesystem from.exportPath
- (Optional) S3 URI (with optional prefix) where the root of your Amazon FSx file system is exported. Can only be specified withimportPath
argument and the path must use the same Amazon S3 bucket as specified inimportPath
. Set equal toimportPath
to overwrite files on export. Defaults tos3://{importBucket}/fSxLustre{creationTimestamp}
. Only supported onPERSISTENT_1
deployment types.importPath
- (Optional) S3 URI (with optional prefix) that you're using as the data repository for your FSx for Lustre file system. For example,s3://exampleBucket/optionalPrefix/
. Only supported onPERSISTENT_1
deployment types.importedFileChunkSize
- (Optional) For files imported from a data repository, this value determines the stripe count and maximum amount of data per file (in MiB) stored on a single physical disk. Can only be specified withimportPath
argument. Defaults to1024
. Minimum of1
and maximum of512000
. Only supported onPERSISTENT_1
deployment types.securityGroupIds
- (Optional) A list of IDs for the security groups that apply to the specified network interfaces created for file system access. These security groups will apply to all network interfaces.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.weeklyMaintenanceStartTime
- (Optional) The preferred start time (ind:hh:mm
format) to perform weekly maintenance, in the UTC time zone.deploymentType
- (Optional) - The filesystem deployment type. One of:SCRATCH_1
,SCRATCH_2
,PERSISTENT_1
,PERSISTENT_2
.kmsKeyId
- (Optional) ARN for the KMS Key to encrypt the file system at rest, applicable forPERSISTENT_1
andPERSISTENT_2
deployment_type. Defaults to an AWS managed KMS Key.perUnitStorageThroughput
- (Optional) - Describes the amount of read and write throughput for each 1 tebibyte of storage, in MB/s/TiB, required for thePERSISTENT_1
andPERSISTENT_2
deployment_type. Valid values forPERSISTENT_1
deployment_type andssd
storage_type are 50, 100, 200. Valid values forPERSISTENT_1
deployment_type andhdd
storage_type are 12, 40. Valid values forPERSISTENT_2
deployment_type andssd
storage_type are 125, 250, 500, 1000.automaticBackupRetentionDays
- (Optional) The number of days to retain automatic backups. Setting this to 0 disables automatic backups. You can retain automatic backups for a maximum of 90 days. only valid forPERSISTENT_1
andPERSISTENT_2
deployment_type.storageType
- (Optional) - The filesystem storage type. Eitherssd
orhdd
, defaults tossd
.hdd
is only supported onPERSISTENT_1
deployment types.driveCacheType
- (Optional) - The type of drive cache used byPERSISTENT_1
filesystems that are provisioned withhdd
storage_type. Required forhdd
storage_type, set to eitherread
ornone
.dailyAutomaticBackupStartTime
- (Optional) A recurring daily time, in the format HH:MM. HH is the zero-padded hour of the day (0-23), and MM is the zero-padded minute of the hour. For example, 05:00 specifies 5 AM daily. only valid forPERSISTENT_1
andPERSISTENT_2
deployment_type. RequiresautomaticBackupRetentionDays
to be set.autoImportPolicy
- (Optional) How Amazon FSx keeps your file and directory listings up to date as you add or modify objects in your linked S3 bucket. see Auto Import Data Repo for more details. Only supported onPERSISTENT_1
deployment types.copyTagsToBackups
- (Optional) A boolean flag indicating whether tags for the file system should be copied to backups. Applicable forPERSISTENT_1
andPERSISTENT_2
deployment_type. The default value is false.dataCompressionType
- (Optional) Sets the data compression configuration for the file system. Valid values arelz4
andnone
. Default value isnone
. Unsetting this value reverts the compression type back tonone
.fileSystemTypeVersion
- (Optional) Sets the Lustre version for the file system that you're creating. Valid values are 2.10 forSCRATCH_1
,SCRATCH_2
andPERSISTENT_1
deployment types. Valid values for 2.12 include all deployment types.logConfiguration
- (Optional) The Lustre logging configuration used when creating an Amazon FSx for Lustre file system. When logging is enabled, Lustre logs error and warning events for data repositories associated with your file system to Amazon CloudWatch Logs.
logConfiguration
destination
- (Optional) The Amazon Resource Name (ARN) that specifies the destination of the logs. The name of the Amazon CloudWatch Logs log group must begin with the/aws/fsx
prefix. If you do not provide a destination, Amazon FSx will create and use a log stream in the CloudWatch Logs/aws/fsx/lustre
log group.level
- (Optional) Sets which data repository events are logged by Amazon FSx. Valid values areWARN_ONLY
,FAILURE_ONLY
,ERROR_ONLY
,WARN_ERROR
anddisabled
. Default value isdisabled
.
Attributes Reference
In addition to all arguments above, the following attributes are exported:
arn
- Amazon Resource Name of the file system.dnsName
- DNS name for the file system, e.g.,fs12345678FsxUsWest2AmazonawsCom
id
- Identifier of the file system, e.g.,fs12345678
networkInterfaceIds
- Set of Elastic Network Interface identifiers from which the file system is accessible. As explained in the documentation, the first network interface returned is the primary network interface.mountName
- The value to be used when mounting the filesystem.ownerId
- AWS account identifier that created the file system.tagsAll
- A map of tags assigned to the resource, including those inherited from the providerdefaultTags
configuration block.vpcId
- Identifier of the Virtual Private Cloud for the file system.
Timeouts
create
- (Default30M
)update
- (Default30M
)delete
- (Default30M
)
Import
FSx File Systems can be imported using the id
, e.g.,
Certain resource arguments, like securityGroupIds
, do not have a FSx API method for reading the information after creation. If the argument is set in the Terraform configuration on an imported resource, Terraform will always show a difference. To workaround this behavior, either omit the argument from the Terraform configuration or use ignoreChanges
to hide the difference, e.g.,
/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
const awsFsxLustreFileSystemExample =
new aws.fsxLustreFileSystem.FsxLustreFileSystem(this, "example", {
securityGroupIds: ["${aws_security_group.example.id}"],
});
awsFsxLustreFileSystemExample.addOverride("lifecycle", [
{
ignore_changes: ["${security_group_ids}"],
},
]);