diff --git a/docs/CONFIG-VARS.md b/docs/CONFIG-VARS.md index 66c29371..36e091fe 100644 --- a/docs/CONFIG-VARS.md +++ b/docs/CONFIG-VARS.md @@ -349,7 +349,7 @@ When `storage_type=ha` and `storage_type_backend=ontap`, an [AWS FSx for NetApp |
Name
|
Description
|
Type
|
Default
|
Notes
| | :--- | :--- | :--- | :--- | :--- | -| 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`. | +| 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`. | | 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. | | 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. | | aws_fsx_ontap_fsxadmin_password | The ONTAP administrative password for the fsxadmin user. | string | "v3RyS3cretPa$sw0rd" | | diff --git a/variables.tf b/variables.tf index c3c894ca..17452b86 100644 --- a/variables.tf +++ b/variables.tf @@ -759,15 +759,15 @@ variable "enable_efs_encryption" { default = false } -# The FSx filesystem availability zone deployment type. Supports MULTI_AZ_1 and SINGLE_AZ_1 +# The FSx filesystem availability zone deployment type. Supports MULTI_AZ_1, MULTI_AZ_2, SINGLE_AZ_1, and SINGLE_AZ_2 variable "aws_fsx_ontap_deployment_type" { - description = "The FSx filesystem availability zone deployment type. Supports MULTI_AZ_1 and SINGLE_AZ_1" + description = "The FSx filesystem availability zone deployment type. Supports MULTI_AZ_1, MULTI_AZ_2, SINGLE_AZ_1, and SINGLE_AZ_2." type = string default = "SINGLE_AZ_1" validation { - condition = contains(["single_az_1", "multi_az_1"], lower(var.aws_fsx_ontap_deployment_type)) - error_message = "ERROR: Supported values for `fsx_ontap_deployment_type` are - SINGLE_AZ_1, MULTI_AZ_1." + condition = contains(["single_az_1", "single_az_2", "multi_az_1", "multi_az_2"], lower(var.aws_fsx_ontap_deployment_type)) + 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." } } diff --git a/vms.tf b/vms.tf index cdcb1639..7e4c31af 100644 --- a/vms.tf +++ b/vms.tf @@ -27,9 +27,10 @@ resource "aws_fsx_ontap_file_system" "ontap-fs" { # Exposing as an input variable since not all regions support both types deployment_type = var.aws_fsx_ontap_deployment_type - # If deployment_type is SINGLE_AZ_1 then subnet_ids should have 1 subnet ID - # If deployment_type is MULTI_AZ_1 then subnet_ids should have 2 subnet IDs, there is a 2 subnet ID maximum - subnet_ids = var.aws_fsx_ontap_deployment_type == "SINGLE_AZ_1" ? [module.vpc.private_subnets[0]] : module.vpc.private_subnets + # If deployment_type is SINGLE_AZ then subnet_ids should have 1 subnet ID + # If deployment_type is MULTI_AZ then subnet_ids should have 2 subnet IDs, there is a 2 subnet ID maximum + subnet_ids = contains(["SINGLE_AZ_1", "SINGLE_AZ_2"], var.aws_fsx_ontap_deployment_type) + ? [module.vpc.private_subnets[0]] : module.vpc.private_subnets throughput_capacity = var.aws_fsx_ontap_file_system_throughput_capacity preferred_subnet_id = module.vpc.private_subnets[0] security_group_ids = [local.workers_security_group_id]