-
Notifications
You must be signed in to change notification settings - Fork 2
fix: template version replacement & metadata updates #58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
ethanndickson
merged 1 commit into
main
from
08-01-fix_template_version_replacement_metadata_updates
Aug 7, 2024
Merged
fix: template version replacement & metadata updates #58
ethanndickson
merged 1 commit into
main
from
08-01-fix_template_version_replacement_metadata_updates
Aug 7, 2024
Conversation
This file contains hidden or 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
1 task
This stack of pull requests is managed by Graphite. Learn more about stacking. Join @ethanndickson and the rest of your teammates on |
b194be2
to
6f8b09f
Compare
ethanndickson
commented
Aug 1, 2024
6f8b09f
to
ef6b800
Compare
5c29d3c
to
bf81000
Compare
ef6b800
to
ffd33bb
Compare
deansheather
reviewed
Aug 1, 2024
ef8d298
to
e54b6f5
Compare
bf81000
to
c0950ec
Compare
ed761c2
to
1a54748
Compare
spikecurtis
reviewed
Aug 5, 2024
1a54748
to
d930a29
Compare
d930a29
to
ef38461
Compare
ethanndickson
commented
Aug 6, 2024
spikecurtis
reviewed
Aug 6, 2024
ef38461
to
b02f6a8
Compare
spikecurtis
approved these changes
Aug 7, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
b02f6a8
to
eaab432
Compare
eaab432
to
cd6a681
Compare
Merge activity
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
To avoid spurious template version diffs, the template resource will only create a new template version under specific circumstances.
terraform apply
s will hash the contents of the given directories. The provider will then check if the hash belongs to a template version known of in the previous apply.Therefore, the
version
name
field should only be set when it's guaranteed that it will be updated whenever the contents of the supplied directory change (such as setting it to the current git commit short-hash). Most users will likely want to use the auto-generated names anyway.Of note, is that we can determine whether or not a new template version will be created during
terraform plan
.During
plan
, we only compare against the last known versions to handle the case where a user reverts the template to one used multipleapply
s prior (such when as undoing a change).If we stored all the hashes of all previous versions, undoing a change like this would not create a new template version in the list, and would instead be a no-op, or only update the name of an older version, which is likely confusing behaviour.