update comment and extend test

This commit is contained in:
James Bardin 2021-07-20 16:09:46 -04:00
parent 66a5950acb
commit 07ee689eff
1 changed files with 11 additions and 1 deletions

View File

@ -510,7 +510,8 @@ output "out" {
} }
func TestContext2Apply_ignoreImpureFunctionChanges(t *testing.T) { 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{ m := testModuleInline(t, map[string]string{
"main.tf": ` "main.tf": `
variable "pw" { 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 ]
}
}
`, `,
}) })