mirror of
https://github.com/opentffoundation/opentf.git
synced 2025-12-25 01:00:16 -05:00
Provider functions in variable validations (#1689)
Signed-off-by: Christian Mesh <christianmesh1@gmail.com>
This commit is contained in:
@@ -7,6 +7,15 @@ terraform {
|
||||
}
|
||||
}
|
||||
|
||||
variable "number" {
|
||||
type = number
|
||||
default = 1
|
||||
validation {
|
||||
condition = provider::example::echo(var.number) > 0
|
||||
error_message = "number must be > ${provider::example::echo(0)}"
|
||||
}
|
||||
}
|
||||
|
||||
output "dummy" {
|
||||
value = provider::example::echo("Hello Functions")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user