File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
registry/coder/modules/agentapi Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -126,6 +126,11 @@ variable "agentapi_port" {
126126 default = 3284
127127}
128128
129+ locals {
130+ # agentapi_subdomain_false_min_version_expr matches a semantic version >= v0.3.2.
131+ agentapi_subdomain_false_min_version_expr = " ^v(0\\ .(3\\ .[2-9]+|[4-9]+\\ .\\ d+)|[1-9]\\ d*\\ .\\ d+\\ .\\ d+)$"
132+ }
133+
129134variable "agentapi_subdomain" {
130135 type = bool
131136 description = " Whether to use a subdomain for AgentAPI."
@@ -134,8 +139,7 @@ variable "agentapi_subdomain" {
134139 condition = var. agentapi_subdomain || (
135140 # If version doesn't look like a valid semantic version, just allow it.
136141 ! can (regex (" ^v\\ d+\\ .\\ d+\\ .\\ d+$" , var. agentapi_version ))
137- ||
138- can (regex (" ^v(0\\ .(3\\ .[2-9]+|[4-9]+\\ .\\ d+)|[1-9]\\ d*\\ .\\ d+\\ .\\ d+)$" , var. agentapi_version ))
142+ || can (regex (local. agentapi_subdomain_false_min_version_expr , var. agentapi_version ))
139143 )
140144 error_message = " Running with subdomain = false is only supported by agentapi >= v0.3.2."
141145 }
You can’t perform that action at this time.
0 commit comments