terraform/internal/configs/testdata/invalid-files/resource-rtb.tf.json
James Bardin a2b189fd71 handle to expression from json files
Because expression from JSON files are handled differently from HCL, we
need to deal with these manually when evaluating the special "to"
syntax. We take the same approach as was done for replace_triggered_by,
where the raw string is extracted from the json expression, and
re-evaluated as an HCL expression.
2023-09-26 11:37:35 -04:00

18 lines
306 B
JSON

{
"resource": {
"test_object": {
"a": {
"count": 1,
"test_string": "new"
},
"b": {
"count": 1,
"lifecycle": {
"replace_triggered_by": [
{"test_object.a[count.index].test_string":"nope"}
]
}
}
}
}
}