diff --git a/Terraform/deploy-fsx-ontap/README.md b/Terraform/deploy-fsx-ontap/README.md index 835b3e1..e191d85 100644 --- a/Terraform/deploy-fsx-ontap/README.md +++ b/Terraform/deploy-fsx-ontap/README.md @@ -201,11 +201,11 @@ terraform apply -y | fsx_deploy_type | The filesystem deployment type. Supports MULTI_AZ_1 and SINGLE_AZ_1 | `string` | `"SINGLE_AZ_1"` | no | | fsx_maintenance_start_time | The preferred start time (in d:HH:MM format) to perform weekly maintenance, in the UTC time zone. | `string` | `"1:00:00"` | no | | fsx_name | The deployed filesystem name | `string` | `"terraform-fsxn"` | no | -| fsx_subnets | The IDs of the subnets fro which the FSxN filesystem will be assigned IP addresses | `map(any)` |
{| no | +| fsx_subnets | A list of IDs for the subnets that the file system will be accessible from. Up to 2 subnets can be provided. | `map(any)` |
"primarysub": "",
"secondarysub": ""
}
{| no | | fsx_tput_in_MBps | The throughput capacity (in MBps) for the file system. Valid values are 128, 256, 512, 1024, 2048, and 4096. | `number` | `256` | no | | kms_key_id | ARN for the KMS Key to encrypt the file system at rest, Defaults to an AWS managed KMS Key. | `string` | `null` | no | | root_vol_sec_style | Specifies the root volume security style, Valid values are UNIX, NTFS, and MIXED. All volumes created under this SVM will inherit the root security style unless the security style is specified on the volume. | `string` | `"UNIX"` | no | -| route_table_ids | 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. | `list(any)` | `null` | no | +| route_table_ids | 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. | `list(any)` | `null` | no | | storage_type | The filesystem storage type | `string` | `"SSD"` | no | | svm_name | The name of the Storage Virtual Machine | `string` | `"first_svm"` | no | | tags | Tags to be applied to the resources | `map(any)` |
"primarysub": "",
"secondarysub": ""
}
{| no | diff --git a/Terraform/deploy-fsx-ontap/main.tf b/Terraform/deploy-fsx-ontap/main.tf index 065ff19..254178c 100644 --- a/Terraform/deploy-fsx-ontap/main.tf +++ b/Terraform/deploy-fsx-ontap/main.tf @@ -133,7 +133,7 @@ resource "aws_vpc_security_group_egress_rule" "allow_all_traffic" { resource "aws_fsx_ontap_file_system" "terraform-fsxn" { // REQUIRED PARAMETERS - subnet_ids = [var.fsx_subnets["primarysub"]] + subnet_ids = [var.fsx_subnets["primarysub"], var.fsx_subnets["secondarysub"]] preferred_subnet_id = var.fsx_subnets["primarysub"] // OPTIONAL PARAMETERS diff --git a/Terraform/deploy-fsx-ontap/variables.tf b/Terraform/deploy-fsx-ontap/variables.tf index 11fa36b..284a4a6 100644 --- a/Terraform/deploy-fsx-ontap/variables.tf +++ b/Terraform/deploy-fsx-ontap/variables.tf @@ -23,9 +23,12 @@ variable "vpc_id" { } variable "fsx_subnets" { - description = "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." - type = list(any) - default = null + description = "A list of IDs for the subnets that the file system will be accessible from. Up to 2 subnets can be provided." + type = map(any) + default = { + "primarysub" = "" + "secondarysub" = "" + } } variable "fsx_capacity_size_gb" { @@ -91,7 +94,7 @@ variable "storage_type" { } variable "route_table_ids" { - description = "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." + description = "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." type = list(any) default = null }
"Name": "terraform-fsxn"
}