- Notifications
You must be signed in to change notification settings - Fork4
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
fix: template version replacement & metadata updates#58
Uh oh!
There was an error while loading.Please reload this page.
Conversation
ethanndickson commentedAug 1, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
This stack of pull requests is managed by Graphite.Learn more about stacking. Join@ethanndickson and the rest of your teammates on |
b194be2
to6f8b09f
CompareUh oh!
There was an error while loading.Please reload this page.
6f8b09f
toef6b800
Compare5c29d3c
tobf81000
Compareef6b800
toffd33bb
CompareUh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
ef8d298
toe54b6f5
Comparebf81000
toc0950ec
Compareed761c2
to1a54748
CompareUh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
1a54748
tod930a29
Compared930a29
toef38461
CompareUh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
ef38461
tob02f6a8
Compare
spikecurtis left a comment
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
toeaab432
Compareeaab432
tocd6a681
Compareethanndickson commentedAug 7, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Merge activity
|
Uh oh!
There was an error while loading.Please reload this page.
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.