AWS Amazon FSx Ontap File System

This page shows how to write Terraform and CloudFormation for Amazon FSx Ontap File System and write them securely.

aws_fsx_ontap_file_system (Terraform)

The Ontap File System in Amazon FSx can be configured in Terraform with the resource name aws_fsx_ontap_file_system. The following sections describe 5 examples of how to use the resource and its parameters.

Example Usage from GitHub

aws_fsx_ontap_file_system.tf#L1
resource "aws_fsx_ontap_file_system" "pass" {
  storage_capacity    = 1024
  subnet_ids          = [aws_subnet.test1.id, aws_subnet.test2.id]
  deployment_type     = "MULTI_AZ_1"
  throughput_capacity = 512
  preferred_subnet_id = aws_subnet.test1.id
aws_fsx_ontap_file_system.tf#L1
resource "aws_fsx_ontap_file_system" "pass" {
  storage_capacity    = 1024
  subnet_ids          = [aws_subnet.test1.id, aws_subnet.test2.id]
  deployment_type     = "MULTI_AZ_1"
  throughput_capacity = 512
  preferred_subnet_id = aws_subnet.test1.id
aws_fsx_ontap_file_system.tf#L1
resource "aws_fsx_ontap_file_system" "pass" {
  storage_capacity    = 1024
  subnet_ids          = [aws_subnet.test1.id, aws_subnet.test2.id]
  deployment_type     = "MULTI_AZ_1"
  throughput_capacity = 512
  preferred_subnet_id = aws_subnet.test1.id
aws_fsx_ontap_file_system.tf#L1
resource "aws_fsx_ontap_file_system" "pass" {
  storage_capacity    = 1024
  subnet_ids          = [aws_subnet.test1.id, aws_subnet.test2.id]
  deployment_type     = "MULTI_AZ_1"
  throughput_capacity = 512
  preferred_subnet_id = aws_subnet.test1.id
aws_fsx_ontap_file_system.tf#L1
resource "aws_fsx_ontap_file_system" "pass" {
  storage_capacity    = 1024
  subnet_ids          = [aws_subnet.test1.id, aws_subnet.test2.id]
  deployment_type     = "MULTI_AZ_1"
  throughput_capacity = 512
  preferred_subnet_id = aws_subnet.test1.id

Review your Terraform file for AWS best practices

Shisho Cloud, our free checker to make sure your Terraform configuration follows best practices, is available (beta).

Parameters

The following arguments are supported:

  • storage_capacity - (Optional) The storage capacity (GiB) of the file system. Valid values between 1024 and 196608.
  • subnet_ids - (Required) A list of IDs for the subnets that the file system will be accessible from. Exactly 2 subnets need to be provided.
  • preferred_subnet_id - (Required) The ID for a subnet. A subnet is a range of IP addresses in your virtual private cloud (VPC).
  • security_group_ids - (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.
  • weekly_maintenance_start_time - (Optional) The preferred start time (in d:HH:MM format) to perform weekly maintenance, in the UTC time zone.
  • deployment_type - (Optional) - The filesystem deployment type. Only MULTI_AZ_1 is supported.
  • kms_key_id - (Optional) ARN for the KMS Key to encrypt the file system at rest, Defaults to an AWS managed KMS Key.
  • automatic_backup_retention_days - (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.
  • storage_type - (Optional) - The filesystem storage type. defaults to SSD.
  • daily_automatic_backup_start_time - (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 automatic_backup_retention_days to be set.
  • disk_iops_configuration - (Optional) The SSD IOPS configuration for the Amazon FSx for NetApp ONTAP file system. See Disk Iops Configuration Below.
  • endpoint_ip_address_range - (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.
  • storage_type - (Optional) - The filesystem storage type. defaults to SSD.
  • fsx_admin_password - (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.
  • route_table_ids - (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 default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

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.

In addition to all arguments above, the following attributes are exported:

  • arn - Amazon Resource Name of the file system.
  • dns_name - DNS name for the file system, e.g., fs-12345678.fsx.us-west-2.amazonaws.com
  • 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., fs-12345678
  • network_interface_ids - Set of Elastic Network Interface identifiers from which the file system is accessible The first network interface returned is the primary network interface.
  • owner_id - AWS account identifier that created the file system.
  • tags_all - A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.
  • vpc_id - Identifier of the Virtual Private Cloud for the file system.

Explanation in Terraform Registry

Manages an Amazon FSx for NetApp ONTAP file system. See the FSx ONTAP User Guide for more information.

AWS::FSx::FileSystem (CloudFormation)

The FileSystem in FSx can be configured in CloudFormation with the resource name AWS::FSx::FileSystem. The following sections describe 10 examples of how to use the resource and its parameters.

Example Usage from GitHub

2-FSX.yml#L50
    Type: 'AWS::FSx::FileSystem'
    UpdateReplacePolicy: Retain
    DeletionPolicy: Retain
    Properties:
      FileSystemType: WINDOWS
      StorageCapacity: 2000
2-FSX.yml#L50
    Type: 'AWS::FSx::FileSystem'
    UpdateReplacePolicy: Retain
    DeletionPolicy: Retain
    Properties:
      FileSystemType: WINDOWS
      StorageCapacity: 2000
cf-fsx-lustre.yml#L46
    Type: AWS::FSx::FileSystem
    DependsOn: "SecurityGroup"
    DeletionPolicy: "Delete"
    Properties:
      # BackupId: String
      FileSystemType: "LUSTRE"
dl-fsx-encryption-check-unit-test.yml#L18
        Type: 'AWS::FSx::FileSystem'
        Properties:
          KMSMasterKeyId: gitlab-codepipeline-cmk
  expectations:
    rules:
      assert_resource_tags: FAIL
fsx-mad.yml#L13
    Type: 'AWS::FSx::FileSystem'
    Properties:
      FileSystemType: WINDOWS
      StorageCapacity: 300
      SubnetIds:
       - !Ref PrivateSubnet1
fsx_filesystem.json#L4
            "Type": "AWS::FSx::FileSystem",
            "Properties": {
                "FileSystemType": "LUSTRE",
                "StorageCapacity": 3600,
                "SubnetIds": [
                    {
fsx_filesystem_win_mgd.json#L4
            "Type": "AWS::FSx::FileSystem",
            "Properties": {
                "FileSystemType": "WINDOWS",
                "StorageCapacity": 300,
                "SubnetIds": [
                    {
aws_fsx.json#L4
    "path": "/ResourceTypes/AWS::FSx::FileSystem/Properties/StorageCapacity/Value",
    "value": {
      "ValueType": "AWS::FSx::FileSystem.StorageCapacity"
    }
  }
]
aws_fsx.json#L4
    "path": "/ResourceTypes/AWS::FSx::FileSystem/Properties/StorageCapacity/Value",
    "value": {
      "ValueType": "AWS::FSx::FileSystem.StorageCapacity"
    }
  }
]
fsx-substack.cfn.json#L289
      "Type": "AWS::FSx::FileSystem"
    }
  }
}

Parameters

Explanation in CloudFormation Registry

The AWS::FSx::FileSystem resource is an Amazon FSx resource type that creates either an Amazon FSx for Windows File Server file system or an Amazon FSx for Lustre file system.

Frequently asked questions

What is AWS Amazon FSx Ontap File System?

AWS Amazon FSx Ontap File System is a resource for Amazon FSx of Amazon Web Service. Settings can be wrote in Terraform and CloudFormation.

Where can I find the example code for the AWS Amazon FSx Ontap File System?

For Terraform, the bridgecrewio/checkov, bridgecrewio/checkov and bridgecrewio/checkov source code examples are useful. See the Terraform Example section for further details.

For CloudFormation, the K-Masopa/CloudOps-reg-za-iac-sagesi, K-Masopa/SageSI-IaC and goodbyegangster/cloudformation source code examples are useful. See the CloudFormation Example section for further details.