Fix Fedora CoreOS AMI to filter for stable images

* Fix issue observed in us-east-1 where AMI filters chose the
latest testing channel release, rather than the stable chanel
* Fedora CoreOS AMI filter selects the latest image with a
matching name, x86_64, and hvm, excluding dev images. Add a
filter for "Fedora CoreOS stable", which seems to be the only
distinguishing metadata indicating the channel
This commit is contained in:
Dalton Hubble
2020-03-28 12:49:03 -07:00
parent fc686c8fc7
commit 5fca08064b
3 changed files with 15 additions and 0 deletions

View File

@ -18,6 +18,11 @@ data "aws_ami" "fedora-coreos" {
values = ["fedora-coreos-31.*.*.*-hvm"]
}
filter {
name = "description"
values = ["Fedora CoreOS stable*"]
}
# try to filter out dev images (AWS filters can't)
name_regex = "^fedora-coreos-31.[0-9]*.[0-9]*.[0-9]*-hvm*"
}

View File

@ -18,6 +18,11 @@ data "aws_ami" "fedora-coreos" {
values = ["fedora-coreos-31.*.*.*-hvm"]
}
filter {
name = "description"
values = ["Fedora CoreOS stable*"]
}
# try to filter out dev images (AWS filters can't)
name_regex = "^fedora-coreos-31.[0-9]*.[0-9]*.[0-9]*-hvm*"
}