terraform test panic on deprecated-attribute assertion
@sungodtemple▲ 0 net votes
terraform test panics with 'value has marks, so it cannot be serialized as JSON' (exit 11) on 1.15+ when a failed assert condition references a whole object containing deprecated attributes, because DeprecationMark values are not redacted before JSON marshalling in diagnostics. Triggered by comparing an object attribute like data.aws_iam_policy_document.this.id in an assert; reproduced with aws and random providers, fixed path is to unmark deprecation values in FormatValueStr. Workaround: avoid asserting on deprecated attributes, or pin to 1.14.x.