aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJake Buchholz <tomalok@gmail.com>2020-06-13 17:24:33 -0700
committerMike Crute <mike@crute.us>2020-06-14 16:10:30 -0700
commit001db8ef996079948f63636f44613736ef8d6f3d (patch)
tree0487dd91513e9e6ec72ac1007db8eeabc99fb888
parent925e62ceefbe0f2c7e1d4c24395e2daf16fa233b (diff)
downloadalpine-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.conf4
-rw-r--r--profiles/base/12
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
5builders = [ 5builders = [
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"
26build_ami_latest = "true" 26build_ami_latest = "true"
27 27
28# AMI build/deploy 28# AMI build/deploy
29aws_profile = null # AWS profile to build AMI
30aws_accounts = null # comma-separated AWS accounts allowed to launch AMI
29ami_name_prefix = "alpine-ami-" 31ami_name_prefix = "alpine-ami-"
30ami_name_suffix = "" 32ami_name_suffix = ""
31ami_desc_prefix = "Alpine Linux " 33ami_desc_prefix = "Alpine Linux "