1
0
mirror of https://github.com/poseidon/typhoon synced 2024-09-22 11:50:52 +02:00
typhoon/aws/flatcar-linux/kubernetes/ami.tf

28 lines
467 B
Terraform
Raw Normal View History

locals {
# Pick a Flatcar Linux AMI
# flatcar-stable -> Flatcar Linux AMI
ami_id = data.aws_ami.flatcar.image_id
channel = split("-", var.os_image)[1]
}
data "aws_ami" "flatcar" {
most_recent = true
owners = ["075585003325"]
filter {
name = "architecture"
values = ["x86_64"]
}
filter {
name = "virtualization-type"
values = ["hvm"]
}
filter {
name = "name"
values = ["Flatcar-${local.channel}-*"]
}
}