Resource: awsFsxOpenzfsFileSystem
Manages an Amazon FSx for OpenZFS file system. See the FSx OpenZFS User Guide for more information.
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.fsxOpenzfsFileSystem.FsxOpenzfsFileSystem(this, "test", {
deploymentType: "SINGLE_AZ_1",
storageCapacity: 64,
subnetIds: ["${aws_subnet.test1.id}"],
throughputCapacity: 64,
});
Argument Reference
The following arguments are supported:
deploymentType
- (Required) - The filesystem deployment type. Valid values:SINGLE_AZ_1
andSINGLE_AZ_2
.storageCapacity
- (Required) The storage capacity (GiB) of the file system. Valid values between64
and524288
.subnetIds
- (Required) A list of IDs for the subnets that the file system will be accessible from. Exactly 1 subnet need to be provided.throughputCapacity
- (Required) Throughput (MB/s) of the file system. Valid values depend ondeploymentType
. Must be one of64
,128
,256
,512
,1024
,2048
,3072
,4096
forSINGLE_AZ_1
. Must be one of160
,320
,640
,1280
,2560
,3840
,5120
,7680
,10240
forSINGLE_AZ_2
.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.backupId
- (Optional) The ID of the source backup to create the filesystem from.copyTagsToBackups
- (Optional) A boolean flag indicating whether tags for the file system should be copied to backups. The default value is false.copyTagsToVolumes
- (Optional) A boolean flag indicating whether tags for the file system should be copied to snapshots. The default value is false.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. RequiresautomaticBackupRetentionDays
to be set.diskIopsConfiguration
- (Optional) The SSD IOPS configuration for the Amazon FSx for OpenZFS file system. See Disk Iops Configuration Below.kmsKeyId
- (Optional) ARN for the KMS Key to encrypt the file system at rest, Defaults to an AWS managed KMS Key.rootVolumeConfiguration
- (Optional) The configuration for the root volume of the file system. All other volumes are children or the root volume. See Root Volume Configuration Below.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.storageType
- (Optional) The filesystem storage type. Onlyssd
is supported.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.
Disk Iops Configuration
iops
- (Optional) - The total number of SSD IOPS provisioned for the file system.mode
- (Optional) - Specifies whether the number of IOPS for the file system is using the system. Valid values areautomatic
andUSER_PROVISIONED
. Default value isautomatic
.
Root Volume Configuration
copyTagsToSnapshots
- (Optional) - A boolean flag indicating whether tags for the file system should be copied to snapshots. The default value is false.dataCompressionType
- (Optional) - Method used to compress the data on the volume. Valid values arelz4
,none
orzstd
. Child volumes that don't specify compression option will inherit from parent volume. This option on file system applies to the root volume.nfsExports
- (Optional) - NFS export configuration for the root volume. Exactly 1 item. See NFS Exports Below.readOnly
- (Optional) - specifies whether the volume is read-only. Default is false.recordSizeKib
- (Optional) - Specifies the record size of an OpenZFS root volume, in kibibytes (KiB). Valid values are4
,8
,16
,32
,64
,128
,256
,512
, or1024
KiB. The default is128
KiB.userAndGroupQuotas
- (Optional) - Specify how much storage users or groups can use on the volume. Maximum of 100 items. See User and Group Quotas Below.
NFS Exports
clientConfigurations
- (Required) - A list of configuration objects that contain the client and options for mounting the OpenZFS file system. Maximum of 25 items. See [Client Configurations](#client configurations) Below.
Client Configurations
clients
- (Required) - A value that specifies who can mount the file system. You can provide a wildcard character (*), an IP address (0.0.0.0), or a CIDR address (192.0.2.0/24. By default, Amazon FSx uses the wildcard character when specifying the client.options
- (Required) - The options to use when mounting the file system. Maximum of 20 items. See the Linix NFS exports man page for more information.crossmount
andsync
are used by default.
User and Group Quotas
id
- (Required) - The ID of the user or group. Valid values between0
and2147483647
storageCapacityQuotaGib
- (Required) - The amount of storage that the user or group can use in gibibytes (GiB). Valid values between0
and2147483647
type
- (Required) - A value that specifies whether the quota applies to a user or group. Valid values areuser
orgroup
.
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 The first network interface returned is the primary network interface.rootVolumeId
- Identifier of the root volume, e.g.,fsvol12345678
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
- (Default60M
)update
- (Default60M
)delete
- (Default60M
)
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 awsFsxOpenzfsFileSystemExample =
new aws.fsxOpenzfsFileSystem.FsxOpenzfsFileSystem(this, "example", {
securityGroupIds: ["${aws_security_group.example.id}"],
});
awsFsxOpenzfsFileSystemExample.addOverride("lifecycle", [
{
ignore_changes: ["${security_group_ids}"],
},
]);