Skip to content

Commit c7c832c

Browse files
authored
remove condition from variable (#38)
on tofu 1.9, it fails with this message: ``` │ Error: Invalid function argument │ │ on .terraform/modules/plt_self_hosted.self_hosted_infra.spacelift_services/variables.tf line 351, in variable "vcs_gateway_domain": │ 351: condition = var.vcs_gateway_domain == null || (!startswith(var.vcs_gateway_domain, "http://") && !startswith(var.vcs_gateway_domain, "https://")) │ ├──────────────── │ │ while calling startswith(str, prefix) │ │ var.vcs_gateway_domain is null │ │ Invalid value for "str" parameter: argument must not be null. ```
1 parent 2e3b808 commit c7c832c

File tree

2 files changed

+0
-8
lines changed

2 files changed

+0
-8
lines changed

modules/ecs/variables.tf

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,6 @@ variable "drain_desired_count" {
6262
variable "vcs_gateway_domain" {
6363
type = string
6464
description = "The domain of the VCS Gateway service. This should be the domain name without the protocol, for example vcs-gateway.example.com, not https://vcs-gateway.example.com."
65-
validation {
66-
condition = var.vcs_gateway_domain == null || (!startswith(var.vcs_gateway_domain, "http://") && !startswith(var.vcs_gateway_domain, "https://"))
67-
error_message = "vcs_gateway_domain should not include a protocol ('http://' or 'https://')"
68-
}
6965
}
7066

7167
variable "vcs_gateway_security_group_id" {

variables.tf

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -347,10 +347,6 @@ variable "vcs_gateway_domain" {
347347
type = string
348348
description = "The domain of the VCS Gateway service. This should be the domain name without the protocol, for example vcs-gateway.example.com, not https://vcs-gateway.example.com."
349349
default = null
350-
validation {
351-
condition = var.vcs_gateway_domain == null || (!startswith(var.vcs_gateway_domain, "http://") && !startswith(var.vcs_gateway_domain, "https://"))
352-
error_message = "vcs_gateway_domain should not include a protocol ('http://' or 'https://')"
353-
}
354350
}
355351

356352
variable "vcs_gateway_log_configuration" {

0 commit comments

Comments
 (0)