Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
tpdownes committed Aug 29, 2023
1 parent c0b6d34 commit 7a59950
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions modules/instance_template/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -221,21 +221,21 @@ variable "additional_networks" {
}))
validation {
condition = alltrue([
for ni in var.network_interfaces : (ni.network == null) != (ni.subnetwork == null)
for ni in var.additional_networks : (ni.network == null) != (ni.subnetwork == null)
])
error_message = "All additional network interfaces must define exactly one of \"network\" or \"subnetwork\"."
}
validation {
condition = alltrue([
for ni in var.network_interfaces : ni.nic_type == "GVNIC" || ni.nic_type == "VIRTIO_NET" || ni.nic_type == null
for ni in var.additional_networks : ni.nic_type == "GVNIC" || ni.nic_type == "VIRTIO_NET" || ni.nic_type == null
])
error_message = "In the variable network_interfaces, field \"nic_type\" must be either \"GVNIC\", \"VIRTIO_NET\" or null."
error_message = "In the variable additional_networks, field \"nic_type\" must be either \"GVNIC\", \"VIRTIO_NET\" or null."
}
validation {
condition = alltrue([
for ni in var.network_interfaces : ni.stack_type == "IPV4_ONLY" || ni.stack_type == "IPV4_IPV6" || ni.stack_type == null
for ni in var.additional_networks : ni.stack_type == "IPV4_ONLY" || ni.stack_type == "IPV4_IPV6" || ni.stack_type == null
])
error_message = "In the variable network_interfaces, field \"stack_type\" must be either \"IPV4_ONLY\", \"IPV4_IPV6\" or null."
error_message = "In the variable additional_networks, field \"stack_type\" must be either \"IPV4_ONLY\", \"IPV4_IPV6\" or null."
}
}

Expand Down

0 comments on commit 7a59950

Please sign in to comment.