Packer Operations: Difference between revisions
Jump to navigation
Jump to search
Line 17: | Line 17: | ||
<syntaxhighlight lang='json'> | <syntaxhighlight lang='json'> | ||
"profile": "customprofile", | { | ||
"profile": "customprofile", | |||
... | |||
} | |||
</syntaxhighlight> | </syntaxhighlight> | ||
Revision as of 01:21, 15 November 2019
Internal
Build an Amazon EC2 AMI
Credentials
Amazon credentials can be provided in the template (not recommended) or as environment variables in the context packer is executed:
export AWS_ACCESS_KEY_ID="anaccesskey"
$ export AWS_SECRET_ACCESS_KEY="asecretkey"
$ export AWS_DEFAULT_REGION="us-west-2"
or in ~/.aws/credentials file. To specify a specific profile in the file, set "AWS_PROFILE" environment variable or use insert this in the template, in the corresponding builder block:
{
"profile": "customprofile",
...
}
then
packer build ...
Build
packer build <template-name>.json