You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
terraform/internal/command/testdata/test/simple_pass_function/main.tftest.hcl

29 lines
504 B

mock_provider "test" {
mock_resource "test_resource" {
defaults = {
id = format("f-%s", "foo")
}
}
}
override_resource {
target = test_resource.bar
values = {
id = format("%s-%s", uuid(), "bar")
}
}
run "validate_test_resource_foo" {
assert {
condition = test_resource.foo.id == "f-foo"
error_message = "invalid value"
}
}
run "validate_test_resource_bar" {
assert {
condition = length(test_resource.bar.id) > 10
error_message = "invalid value"
}
}