File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
Terraform/deploy-fsx-ontap/module Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ resource "aws_fsx_ontap_file_system" "terraform-fsxn" {
1414 preferred_subnet_id = var. subnets [" primarysub" ]
1515
1616 storage_capacity = var. capacity_size_gb
17- security_group_ids = var. create_sg ? [element (aws_security_group. fsx_sg [* ]. id , 0 )] : [ var . security_group_id ]
17+ security_group_ids = var. create_sg ? [element (aws_security_group. fsx_sg [* ]. id , 0 )] : var. security_group_ids
1818 deployment_type = var. deployment_type
1919 throughput_capacity_per_ha_pair = var. throughput_in_MBps
2020 ha_pairs = var. ha_pairs
@@ -41,7 +41,7 @@ resource "aws_fsx_ontap_file_system" "terraform-fsxn" {
4141 error_message = " You must specify EITHER cidr_block OR source_sg_id when creating a security group, not both."
4242 }
4343 precondition {
44- condition = var. create_sg || var. security_group_id != " "
44+ condition = var. create_sg || length ( var. security_group_ids ) > 0
4545 error_message = " You must specify a security group ID when not creating a security group."
4646 }
4747 }
Original file line number Diff line number Diff line change @@ -174,10 +174,10 @@ variable "create_sg" {
174174 default = true
175175}
176176
177- variable "security_group_id " {
178- description = " If you are not creating the security group, provide the ID of the security group to be used."
179- type = string
180- default = " "
177+ variable "security_group_ids " {
178+ description = " If you are not creating the security group, provide a list of IDs of the security groups to be used."
179+ type = list ( string )
180+ default = []
181181}
182182
183183variable "security_group_name_prefix" {
You can’t perform that action at this time.
0 commit comments