release.auto.pkvars.hcl refactor: creating 1 file per AMI platform #167
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.
Summary
This PR refactors the
release.auto.pkrvars.hcl
config.This is auto-generated using the
generate-release-vars.sh
script. It sets dynamic values for things like the ami version, ecs agent version, source ami names, etc. ECS builds variants based off the AL1, AL2 and AL2023 platforms. Currently, all these platforms share the samerelease.auto.pkrvars.hcl
configuration.Currently, an ECS engineer runs the
generate-release-vars.sh
script manually, and does a PR to review the changes inrelease.auto.pkrvars.hcl
config. With project Shinkansen, we're going to have a GitHub action run the script and generate the configuration.Alongside the GH action automation, we'd also like each platform to have its own configuration. This would enable us to only build AMIs that have updates.
ami_version
is the unique key that dictates if a new AMI would be built. With this change, each platform gets its own uniqueami_version
.Implementation details
release.auto.pkrvars.hcl
->release-{platform}.auto.pkrvars.hcl
updates to the Makefile to ensure that AMI build targets continue to work as expected.
moved the following from
release.auto.pkrvars.hcl
tovariables.pkr.hcl
defaults:These variables would be treated no differently than other dependency like
exec_ssm_version
. An engineer would manually qualify and update the default values for the above invariables.pkr.hcl
, outside of a Shinkansen release. If customers would like to use custom values, they can continue doing so usingoverrides.auto.pkrvars.hcl
.Testing
make al1, make al2, and make al2023 to ensure that AMI builds continue to work with the refactor.
New tests cover the changes: no
Description for the changelog
release.auto.pkvars.hcl refactor: creating 1 file per AMI platform
Licensing
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.