terraform/internal/command/testdata/test/write-only-attributes-overridden/main.tftest.hcl
Liam Cervante 7fadbe34de
write-only attributes: internal providers should set write-only attributes to null (#36824)
* write-only attributes: internal providers should set write-only attributes to null

* add changelog

* fix copywrite headers
2025-04-02 15:58:42 +02:00

38 lines
597 B
HCL

provider "test" {}
override_resource {
target = test_resource.resource
values = {
id = "resource"
}
}
override_data {
target = data.test_data_source.datasource
values = {
value = "hello"
}
}
run "test" {
variables {
input = "input"
}
assert {
condition = data.test_data_source.datasource.value == "hello"
error_message = "wrong value"
}
assert {
condition = test_resource.resource.value == "hello"
error_message = "wrong value"
}
assert {
condition = test_resource.resource.id == "resource"
error_message = "wrong value"
}
}