From 33cc8888502954262bee5cf4ed0f2d2b9ca8ddc8 Mon Sep 17 00:00:00 2001 From: Turtle Kalus Date: Wed, 14 Oct 2020 08:01:54 -0700 Subject: [PATCH] Use latest AMI for Ubuntu Xenial based on search (#9076) Also, remove public share for ami build. --- terraform/aws/packer.json | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/terraform/aws/packer.json b/terraform/aws/packer.json index 1c778fdc2..ceef10000 100644 --- a/terraform/aws/packer.json +++ b/terraform/aws/packer.json @@ -2,11 +2,20 @@ "builders": [{ "type": "amazon-ebs", "region": "us-east-1", - "source_ami": "ami-80861296", + "source_ami_filter": { + "filters": { + "virtualization-type": "hvm", + "architecture": "x86_64", + "name": "ubuntu/images/hvm-ssd/ubuntu-xenial-16.04-amd64-server-*", + "block-device-mapping.volume-type": "gp2", + "root-device-type": "ebs" + }, + "owners": ["099720109477"], + "most_recent": true + }, "instance_type": "t2.medium", "ssh_username": "ubuntu", - "ami_name": "hashistack {{timestamp}}", - "ami_groups": ["all"] + "ami_name": "hashistack {{timestamp}}" }], "provisioners": [ {