feat: Add control to use timestamp to trigger the package creation or not (useful for CI/CD) #521
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
Add a variable
trigger_on_package_timestamp
(boolean - defaults totrue
) to whether use timestamp to trigger the package creation or not.Motivation and Context
Problem
terraform apply
. The lambda is created.builds
directory (to simulate a CICD job with an empty environment).terraform plan
again, it will detect a drift because the timestamp has changed.One solution was to add the variable
recreate_missing_package = false
, but when the CICD job (without anybuilds
directory) runsterraform apply
will face this error:Solution
Add a variable
trigger_on_package_timestamp
(boolean - defaults totrue
) to whether use timestamp to trigger the package creation or not.Fix #396
Breaking Changes
None.
How Has This Been Tested?
examples/*
to demonstrate and validate my change(s)examples/*
projectspre-commit run -a
on my pull requestI have added an
example/simple-cicd
with atest.sh
inside to run the test scenario.