File tree Expand file tree Collapse file tree
modules/network/gpu-rdma-vpc Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -67,13 +67,14 @@ variable "subnetworks_template" {
6767 validation {
6868 # If it's NOT a RoCE Metal profile, the template cannot be null
6969 condition = (
70- can (regex (" vpc-roce-metal" , var. network_profile )) ||
70+ can (regex (" vpc-roce-metal" , var. network_profile )) ?
71+ var. subnetworks_template == null :
7172 var. subnetworks_template != null
7273 )
73- error_message = " subnetworks_template cannot be null unless using a 'vpc-roce-metal' network profile."
74+ error_message = " subnetworks_template must be null when using 'vpc-roce-metal' network profile and non-null for all other profiles ."
7475 }
7576
76- validation {
77+ validation {
7778 # If template is provided, count must be > 0
7879 condition = var. subnetworks_template == null ? true : var. subnetworks_template . count > 0
7980 error_message = " Number of subnetworks must be greater than 0."
You can’t perform that action at this time.
0 commit comments