I recently found an limitation with the CustomizeDiff approach in that if i Get a field which is interpolated its empty, if you look at the simplistic example:
resource "foo" "bar" {
configuration = <<EOF
{
"a": "foo",
"b": "bar
}
EOF
}
resource "bar" "foo" {
configuration = <<EOF
{
"a": "foo",
"b": "${foo.bar.id}"
}
EOF
}
Resource foo.bar can be validated, bar.foo cannot. I can’t see any methods on *schema.ResourceDiff which could get me the un-interpolated values (i’m only doing key presence validation). Is it possible to handle this sort of use case?