diff --git a/internal/terraform/context_apply2_test.go b/internal/terraform/context_apply2_test.go index e172b4dd2..681595959 100644 --- a/internal/terraform/context_apply2_test.go +++ b/internal/terraform/context_apply2_test.go @@ -510,7 +510,8 @@ output "out" { } func TestContext2Apply_ignoreImpureFunctionChanges(t *testing.T) { - // Ensure we're not trying to double-mark values decoded from state + // The impure function call should not cause a planned change with + // ignore_changes m := testModuleInline(t, map[string]string{ "main.tf": ` variable "pw" { @@ -527,6 +528,15 @@ resource "test_object" "x" { } } +resource "test_object" "y" { + test_map = { + string = "X${bcrypt(var.pw)}" + } + lifecycle { + ignore_changes = [ test_map ] + } +} + `, })