add base ami choice to packer json and Makefiles#921
Open
stvhawes wants to merge 1 commit intobuildkite:mainfrom
Open
add base ami choice to packer json and Makefiles#921stvhawes wants to merge 1 commit intobuildkite:mainfrom
stvhawes wants to merge 1 commit intobuildkite:mainfrom
Conversation
keithduncan
reviewed
Sep 20, 2021
Contributor
There was a problem hiding this comment.
Thank you for opening this pull request @stvhawes!
Customising the stack’s source AMI for the Packer build isn’t a customisation I had considered but I think it’s a nice feature I’m keen to support.
I’ve got one question 👇 on the ergonomics of using this to ensure existing automation that invokes make packer continues to work but otherwise I support it in principle.
| -w /src/packer/linux \ | ||
| hashicorp/packer:$(PACKER_VERSION) build -timestamp-ui -var 'region=$(AWS_REGION)' \ | ||
| -var 'arch=x86_64' -var 'goarch=amd64' -var 'instance_type=$(AMD64_INSTANCE_TYPE)' \ | ||
| -var 'source_ami_name_filter=$(SOURCE_AMI_NAME_FILTER)' \ |
Contributor
There was a problem hiding this comment.
Does this override the default value from the variables section with an empty string if the environment variable isn’t set?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
In our use case the base ami is pre-hardened so owned by our aws account. Note also that the list of owners can be passed as a comma separated string (or a single string) and is automatically converted to an array by packer.
ref: hashicorp/packer#2278 (comment) for comma separated string automatically converted to an array by packer.
also: we reference this repo as a submodule, with our own pipeline.yml and our own steps/packer.json driving the submodule Makefile.