Skip to content
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

Makefile: Add the ability to override the AMI data file suffix #1784

Merged
merged 1 commit into from
Oct 25, 2021

Conversation

zmrow
Copy link
Contributor

@zmrow zmrow commented Oct 21, 2021

Description of changes:

This adds an additional variable to the `Makefile` that can be used to
override the suffix of the file where AMI data is written during publish
operations.  It is currently set to `amis.json`, which is identical to
its previous hard-coded value.

Overriding this variable can be useful when a user is publishing to
multiple places with different `Infra.toml` files and wishes to write
AMI data to specifically named files.

Testing done:

  • Created an additional Infra-test.toml with different regions than my personal Infra.toml
  • Ran cargo make ami, cargo make ami-public, cargo make ami-private, cargo make grant-ami, cargo make revoke-ami, and cargo make ssm (with a personal prefix) without any options and observed the "default" *amis.json file being used and correct actions being taken
  • Ran cargo make ami, cargo make ami-public, cargo make ami-private, cargo make grant-ami, cargo make revoke-ami, and cargo make ssm (with a personal prefix) with -e "PUBLISH_INFRA_CONFIG_PATH=Infra-test.toml" -e "AMI_DATA_FILE_SUFFIX=amis-test.json" and observed the *amis-test.json file being used and correct actions being taken.

Terms of contribution:

By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.

This adds an additional variable to the `Makefile` that can be used to
override the suffix of the file where AMI data is written during publish
operations.  It is currently set to `amis.json`, which is identical to
its previous hard-coded value.

Overriding this variable can be useful when a user is publishing to
multiple places with different `Infra.toml` files and wishes to write
AMI data to specifically named files.
@zmrow zmrow merged commit e443386 into bottlerocket-os:develop Oct 25, 2021
@zmrow zmrow deleted the amis-json-suffix branch October 25, 2021 14:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants