Skip to content

Resource: awsFsxOntapFileSystem

Manages an Amazon FSx for NetApp ONTAP file system. See the FSx ONTAP 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.fsxOntapFileSystem.FsxOntapFileSystem(this, "test", {
  deploymentType: "MULTI_AZ_1",
  preferredSubnetId: "${aws_subnet.test1.id}",
  storageCapacity: 1024,
  subnetIds: ["${aws_subnet.test1.id}", "${aws_subnet.test2.id}"],
  throughputCapacity: 512,
});

Argument Reference

The following arguments are supported:

  • storageCapacity - (Optional) The storage capacity (GiB) of the file system. Valid values between 1024 and 196608.
  • subnetIds - (Required) A list of IDs for the subnets that the file system will be accessible from. Upto 2 subnets can be provided.
  • preferredSubnetId - (Required) The ID for a subnet. A subnet is a range of IP addresses in your virtual private cloud (VPC).
  • 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.
  • weeklyMaintenanceStartTime - (Optional) The preferred start time (in d:hh:mm format) to perform weekly maintenance, in the UTC time zone.
  • deploymentType - (Optional) - The filesystem deployment type. Supports MULTI_AZ_1 and SINGLE_AZ_1.
  • kmsKeyId - (Optional) ARN for the KMS Key to encrypt the file system at rest, Defaults to an AWS managed KMS Key.
  • 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.
  • 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. Requires automaticBackupRetentionDays to be set.
  • diskIopsConfiguration - (Optional) The SSD IOPS configuration for the Amazon FSx for NetApp ONTAP file system. See Disk Iops Configuration Below.
  • endpointIpAddressRange - (Optional) Specifies the IP address range in which the endpoints to access your file system will be created. By default, Amazon FSx selects an unused IP address range for you from the 198.19.* range.
  • storageType - (Optional) - The filesystem storage type. defaults to ssd.
  • fsxAdminPassword - (Optional) The ONTAP administrative password for the fsxadmin user that you can use to administer your file system using the ONTAP CLI and REST API.
  • routeTableIds - (Optional) Specifies the VPC route tables in which your file system's endpoints will be created. You should specify all VPC route tables associated with the subnets in which your clients are located. By default, Amazon FSx selects your VPC's default route table.
  • tags - (Optional) 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.
  • throughputCapacity - (Required) Sets the throughput capacity (in MBps) for the file system that you're creating. Valid values are 128, 256, 512, 1024, and 2048.

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 are automatic and USER_PROVISIONED. Default value is automatic.

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
  • endpoints - The endpoints that are used to access data or to manage the file system using the NetApp ONTAP CLI, REST API, or NetApp SnapMirror. See Endpoints below.
  • 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.
  • ownerId - AWS account identifier that created the file system.
  • tagsAll - A map of tags assigned to the resource, including those inherited from the provider defaultTags configuration block.
  • vpcId - Identifier of the Virtual Private Cloud for the file system.

Endpoints

  • intercluster - An endpoint for managing your file system by setting up NetApp SnapMirror with other ONTAP systems. See Endpoint.
  • management - An endpoint for managing your file system using the NetApp ONTAP CLI and NetApp ONTAP API. See Endpoint.

Endpoint

  • dnsName - The Domain Name Service (DNS) name for the file system. You can mount your file system using its DNS name.
  • ipAddresses - IP addresses of the file system endpoint.

Timeouts

Configuration options:

  • create - (Default 60M)
  • update - (Default 60M)
  • delete - (Default 60M)

Import

FSx File Systems can be imported using the id, e.g.,

$ terraform import aws_fsx_ontap_file_system.example fs-543ab12b1ca672f33

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 awsFsxOntapFileSystemExample =
  new aws.fsxOntapFileSystem.FsxOntapFileSystem(this, "example", {
    securityGroupIds: ["${aws_security_group.example.id}"],
  });
awsFsxOntapFileSystemExample.addOverride("lifecycle", [
  {
    ignore_changes: ["${security_group_ids}"],
  },
]);