-
Notifications
You must be signed in to change notification settings - Fork 9.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
provider/template: don't diff when there's no diff
This reworks the template lifecycle a bit such that we get nicer diff behavior. First, we tick ForceNew on for both filename and vars, so that the diff indicates that the template will be "replaced" on change. This is mostly cosmetic, but it also tracks conceptually with the fact that the identifier we use is a hash of the contents, so any change essentially makes a "new resource". Second, we change the Exists implementation to only return `false` when there has been a change in the rendered template. This lets descendent resources see the computed value changing so that they'll properly trigger in the plan. Fixes #1898 Refs #1866 (but does not fix, there's another deeper issue there)
- Loading branch information
Showing
3 changed files
with
33 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -50,7 +50,6 @@ output "rendered" { | |
} | ||
return nil | ||
}, | ||
TransientResource: true, | ||
}, | ||
}, | ||
}) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters