diff options
author | Jake Buchholz <tomalok@gmail.com> | 2020-06-13 17:24:33 -0700 |
---|---|---|
committer | Mike Crute <mike@crute.us> | 2020-06-14 16:10:30 -0700 |
commit | 001db8ef996079948f63636f44613736ef8d6f3d (patch) | |
tree | 0487dd91513e9e6ec72ac1007db8eeabc99fb888 | |
parent | 925e62ceefbe0f2c7e1d4c24395e2daf16fa233b (diff) | |
download | alpine-ec2-ami-001db8ef996079948f63636f44613736ef8d6f3d.tar.bz2 alpine-ec2-ami-001db8ef996079948f63636f44613736ef8d6f3d.tar.xz alpine-ec2-ami-001db8ef996079948f63636f44613736ef8d6f3d.zip |
Optional AWS Profile & Cross-Account Access
Allows encoding of the AWS profile to use in the build profile, and enabling the built AMI with a list of AWS accounts that are allowed access.
-rw-r--r-- | packer.conf | 4 | ||||
-rw-r--r-- | profiles/base/1 | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/packer.conf b/packer.conf index e741255..04962bf 100644 --- a/packer.conf +++ b/packer.conf | |||
@@ -4,7 +4,8 @@ | |||
4 | 4 | ||
5 | builders = [ | 5 | builders = [ |
6 | { | 6 | { |
7 | type = "amazon-ebssurrogate" | 7 | type = "amazon-ebssurrogate" |
8 | profile = "{{user `aws_profile`}}" | ||
8 | 9 | ||
9 | ### Builder Instance Details | 10 | ### Builder Instance Details |
10 | 11 | ||
@@ -60,6 +61,7 @@ builders = [ | |||
60 | } | 61 | } |
61 | ena_support = "true" | 62 | ena_support = "true" |
62 | sriov_support = "true" | 63 | sriov_support = "true" |
64 | ami_users = "{{user `aws_users`}}" | ||
63 | } | 65 | } |
64 | ] | 66 | ] |
65 | 67 | ||
diff --git a/profiles/base/1 b/profiles/base/1 index 8ba6ff8..53cb819 100644 --- a/profiles/base/1 +++ b/profiles/base/1 | |||
@@ -26,6 +26,8 @@ build_ami_owner = "137112412989" | |||
26 | build_ami_latest = "true" | 26 | build_ami_latest = "true" |
27 | 27 | ||
28 | # AMI build/deploy | 28 | # AMI build/deploy |
29 | aws_profile = null # AWS profile to build AMI | ||
30 | aws_accounts = null # comma-separated AWS accounts allowed to launch AMI | ||
29 | ami_name_prefix = "alpine-ami-" | 31 | ami_name_prefix = "alpine-ami-" |
30 | ami_name_suffix = "" | 32 | ami_name_suffix = "" |
31 | ami_desc_prefix = "Alpine Linux " | 33 | ami_desc_prefix = "Alpine Linux " |