docs: Update for usage of the triggers variable with force_new_deployment #284
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.
Description
The
triggers
varable is used to ensureforce_new_deployment=true
is respected by Terraform, for when you want to have an ECS Service that deploys tasks with image tags that don't change - e.g. if you use rolling image tags, perhaps managed outside of terraform entirely.This
triggers
feature was originally implemented from this issue which provides an example like so:But this won't work because
timestamp()
is evaluated at apply time, not plan - as explained here. The solution is that theplantimestamp()
function must be used instead.The main terraform-provider-aws docs have already been updated it seems - but that's not a very visible doc, so I think it's important to have it updated here as well.
Motivation and Context
This PR just updates the documentation here to make it consistent and fix the current example in the docs which won't work; so that if one visits the documentation page here, it is no longer misleading.
Breaking Changes
None - this is purely a small documentation update.
How Has This Been Tested?
examples/*
to demonstrate and validate my change(s)examples/*
projectspre-commit run -a
on my pull request