e2e: filter default AMI by OS

Add an OS tag to Packer builds of our e2e test AMIs and then filters
by this in Terraform.
This commit is contained in:
Tim Gross 2019-08-30 16:51:13 -04:00
parent ed51d37095
commit 7ee3333a2d
2 changed files with 10 additions and 1 deletions

View File

@ -63,6 +63,12 @@ data "aws_ami" "main" {
name = "name"
values = ["nomad-e2e-*"]
}
filter {
name = "tag:OS"
values = ["Ubuntu"]
}
}
output "servers" {

View File

@ -6,7 +6,10 @@
"instance_type": "t2.medium",
"ssh_username": "ubuntu",
"ami_name": "nomad-e2e-{{timestamp}}",
"ami_groups": ["all"]
"ami_groups": ["all"],
"tags": {
"OS": "Ubuntu"
}
}],
"provisioners": [
{