vmware-archive/wardroom

Consider using `source_ami_filter` so not to hard code AMI image ID's across regions

aaroniscode opened this issue · 3 comments

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 }}"

@aaroniscode Thanks, Aaron! I wasn't aware of this functionality. At a quick glance, it seems like something that might be useful to incorporate.

@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

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.