Skip to content

Commit 02667dd

Browse files
committed
Update variable checks for network_type
1 parent 9b13d14 commit 02667dd

3 files changed

Lines changed: 15 additions & 3 deletions

File tree

alz/azuredevops/variables.tf

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,13 @@ variable "bootstrap_location" {
9999
}
100100

101101
variable "network_type" {
102-
description = "The network type for the deployment (e.g. 'hubNetworking' or 'vwanConnectivity')"
102+
description = "The network type for the deployment. Valid values: 'hubNetworking', 'vwanConnectivity', or '' (empty string for no networking)"
103103
type = string
104104
default = ""
105+
validation {
106+
condition = var.network_type == "" || var.network_type == "hubNetworking" || var.network_type == "vwanConnectivity"
107+
error_message = "The network_type must be either 'hubNetworking', 'vwanConnectivity', or '' (empty string for no networking)"
108+
}
105109
}
106110

107111
variable "azure_devops_personal_access_token" {

alz/github/variables.tf

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,13 @@ variable "bootstrap_location" {
9999
}
100100

101101
variable "network_type" {
102-
description = "The network type for the deployment (e.g. 'hubNetworking' or 'vwanConnectivity')"
102+
description = "The network type for the deployment (e.g. 'hubNetworking' or 'vwanConnectivity'). Leave empty for no networking."
103103
type = string
104104
default = ""
105+
validation {
106+
condition = var.network_type == "" || var.network_type == "hubNetworking" || var.network_type == "vwanConnectivity"
107+
error_message = "The network_type must be either 'hubNetworking', 'vwanConnectivity', or an empty string (for no networking). Note: values are case-sensitive."
108+
}
105109
}
106110

107111
variable "github_personal_access_token" {

alz/local/variables.tf

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,13 @@ variable "bootstrap_location" {
8888
}
8989

9090
variable "network_type" {
91-
description = "The network type for the deployment (e.g. 'hubNetworking' or 'vwanConnectivity')"
91+
description = "The network type for the deployment (e.g. 'hubNetworking' or 'vwanConnectivity'). Leave empty for no networking."
9292
type = string
9393
default = ""
94+
validation {
95+
condition = var.network_type == "" || var.network_type == "hubNetworking" || var.network_type == "vwanConnectivity"
96+
error_message = "The network_type must be either 'hubNetworking', 'vwanConnectivity', or an empty string (for no networking). Note: values are case-sensitive."
97+
}
9498
}
9599

96100
variable "on_demand_folder_repository" {

0 commit comments

Comments
 (0)