Consider using `source_ami_filter` so not to hard code AMI image ID's across regions
aaroniscode opened this issue · 3 comments
aaroniscode commented
Discussing with @scottslowe , he mentioned I should open an Issue to see if this makes sense.
Here is a snippet from my packer build file that I use to make k8s images:
"builders": [{
"type": "amazon-ebs",
"source_ami_filter": {
"filters": {
"virtualization-type": "hvm",
"root-device-type": "ebs",
"name": "ubuntu/images/hvm-ssd/ubuntu-bionic-18.04-amd64-server-*"
},
"owners": ["099720109477"],
"most_recent": true
},
"instance_type": "t3.micro",
"ssh_username": "ubuntu",
"ami_name": "packer {{ timestamp }}"
scottslowe commented
@aaroniscode Thanks, Aaron! I wasn't aware of this functionality. At a quick glance, it seems like something that might be useful to incorporate.
detiber commented
@chuckha @vincepri @randomvariable we'll probably want to pull this into cluster-api-provider-aws
as well, docs for this are here: https://www.packer.io/docs/builders/amazon-ebs.html#source_ami_filter
craigtracey commented
I'd like to see this as part of a significant rethink of how we are driving image builds. I feel like we need a better way to drive this than the tooling inside the wardroom/
directory.