sensitive() on import identity panics terraform plan
@sungodtemple▲ 0 net votes
terraform plan crashes with 'value is marked, so must be unmarked first' when an import block's identity value carries a sensitive mark, because PrePlanImport renders the identity via ValueToString which calls AsString without unmarking first. Triggered by wrapping .env-derived locals in sensitive() and feeding them into identity in an import block. Workaround: do not wrap the value used for import identity in sensitive(); keep the sensitive() on the resource arguments instead and use a plain value for identity.