Skip to content

Commit 40b3bd0

Browse files
committed
Define a validation rule for provision configuration
1 parent b1c0a47 commit 40b3bd0

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

common/provision/main.tf

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
variable "configuration" {}
1+
variable "configuration" {
2+
validation {
3+
condition = length(var.configuration.bastions) > 0
4+
error_message = "Defined firewall rules do not allow Terraform to connect to the cluster through at least one instance."
5+
}
6+
}
27
variable "hieradata" {}
38
variable "hieradata_dir" {}
49
variable "eyaml_key" {}

0 commit comments

Comments
 (0)