/
githubmirror
/
terraform
Обзор
Документация
Войти
/
githubmirror
/
terraform
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
internal/stacks/stackruntime/testdata/mainbundle/test/checkable-objects/checkable-objects.tf
44 строки
800 B
Liam Cervante
stacks: include plan mode in stacks plan format (#35405)
23 июл 2024, 18:45
Не верифицирован
23 июл 2024, 18:45
87bbc47
Код
Авторство
О чём код?
terraform { required_providers { testing = { source = "hashicorp/testing" version = "0.1.0" } } } variable "foo" { type = string validation { condition = length(var.foo) > 0 error_message = "input must not be empty" } } resource "testing_resource" "main" { id = "test" value = var.foo lifecycle { postcondition { condition = length(self.value) > 0 error_message = "value must not be empty" } } } output "foo" { value = testing_resource.main.value precondition { condition = length(testing_resource.main.value) > 0 error_message = "value must not be empty" } } check "value_is_baz" { assert { condition = testing_resource.main.value == "baz" error_message = "value must be 'baz'" } }