Skip to content

Commit f7725f9

Browse files
committed
feat: allow/support second generation FSx ONTAP filesystems
Signed-off-by: Jeff Owens <[email protected]>
1 parent 1936403 commit f7725f9

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

docs/CONFIG-VARS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ When `storage_type=ha` and `storage_type_backend=ontap`, an [AWS FSx for NetApp
349349
<!--| Name | Description | Type | Default | Notes | -->
350350
| <div style="width:50px">Name</div> | <div style="width:150px">Description</div> | <div style="width:50px">Type</div> | <div style="width:75px">Default</div> | <div style="width:150px">Notes</div> |
351351
| :--- | :--- | :--- | :--- | :--- |
352-
| aws_fsx_ontap_deployment_type | The FSx file system availability zone deployment type. | string | SINGLE_AZ_1 | Supported values are `MULTI_AZ_1` and `SINGLE_AZ_1`. |
352+
| aws_fsx_ontap_deployment_type | The FSx file system availability zone deployment type. | string | SINGLE_AZ_1 | Supported values are `MULTI_AZ_1`, `MULTI_AZ_2`, `SINGLE_AZ_1`, and `SINGLE_AZ_2`. |
353353
| aws_fsx_ontap_file_system_storage_capacity | The storage capacity of the ONTAP file system in GiB. | number | 1024 | Valid values range from 1024 to 196608. |
354354
| aws_fsx_ontap_file_system_throughput_capacity | The throughput capacity of the ONTAP file system in MBps. | number | 256 | Valid values are 128, 256, 512, 1024, 2048 and 4096. |
355355
| aws_fsx_ontap_fsxadmin_password | The ONTAP administrative password for the fsxadmin user. | string | "v3RyS3cretPa$sw0rd" | |

variables.tf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -759,15 +759,15 @@ variable "enable_efs_encryption" {
759759
default = false
760760
}
761761

762-
# The FSx filesystem availability zone deployment type. Supports MULTI_AZ_1 and SINGLE_AZ_1
762+
# The FSx filesystem availability zone deployment type. Supports MULTI_AZ_1, MULTI_AZ_2, SINGLE_AZ_1, and SINGLE_AZ_2
763763
variable "aws_fsx_ontap_deployment_type" {
764-
description = "The FSx filesystem availability zone deployment type. Supports MULTI_AZ_1 and SINGLE_AZ_1"
764+
description = "The FSx filesystem availability zone deployment type. Supports MULTI_AZ_1, MULTI_AZ_2, SINGLE_AZ_1, and SINGLE_AZ_2."
765765
type = string
766766
default = "SINGLE_AZ_1"
767767

768768
validation {
769-
condition = contains(["single_az_1", "multi_az_1"], lower(var.aws_fsx_ontap_deployment_type))
770-
error_message = "ERROR: Supported values for `fsx_ontap_deployment_type` are - SINGLE_AZ_1, MULTI_AZ_1."
769+
condition = contains(["single_az_1", "single_az_2", "multi_az_1", "multi_az_2"], lower(var.aws_fsx_ontap_deployment_type))
770+
error_message = "ERROR: Supported values for `aws_fsx_ontap_deployment_type` are SINGLE_AZ_1, SINGLE_AZ_2, MULTI_AZ_1, and MULTI_AZ_2."
771771
}
772772
}
773773

vms.tf

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,10 @@ resource "aws_fsx_ontap_file_system" "ontap-fs" {
2727
# Exposing as an input variable since not all regions support both types
2828
deployment_type = var.aws_fsx_ontap_deployment_type
2929

30-
# If deployment_type is SINGLE_AZ_1 then subnet_ids should have 1 subnet ID
31-
# If deployment_type is MULTI_AZ_1 then subnet_ids should have 2 subnet IDs, there is a 2 subnet ID maximum
32-
subnet_ids = var.aws_fsx_ontap_deployment_type == "SINGLE_AZ_1" ? [module.vpc.private_subnets[0]] : module.vpc.private_subnets
30+
# If deployment_type is SINGLE_AZ then subnet_ids should have 1 subnet ID
31+
# If deployment_type is MULTI_AZ then subnet_ids should have 2 subnet IDs, there is a 2 subnet ID maximum
32+
subnet_ids = contains(["SINGLE_AZ_1", "SINGLE_AZ_2"], var.aws_fsx_ontap_deployment_type)
33+
? [module.vpc.private_subnets[0]] : module.vpc.private_subnets
3334
throughput_capacity = var.aws_fsx_ontap_file_system_throughput_capacity
3435
preferred_subnet_id = module.vpc.private_subnets[0]
3536
security_group_ids = [local.workers_security_group_id]

0 commit comments

Comments
 (0)