It would be very useful if we could use a search query for an AMI instead of just a static AMI ID. For example, packer lets me do this:
"source_ami_filter": {
"most_recent": true,
"owners": [
"099720109477"
],
"filters": {
"root-device-type": "ebs",
"state": "available",
"name": "ubuntu/images/hvm-ssd/ubuntu-bionic-18.04-amd64-server-*",
"virtualization-type": "hvm",
"image-type": "machine",
"architecture": "x86_64"
}
}
to use the most recent ubuntu 18.04 AMI every time it is run. |