mirror of
https://github.com/poseidon/typhoon
synced 2024-06-07 23:36:10 +02:00
87a8278c9d
* Rename launch configuration to use a name_prefix named after the cluster and worker to improve identifiability * Shorten AWS autoscaling group name to not include the launch config id. Years ago this used to be needed to update the ASG but the AWS provider detects changes to the launch configuration just fine
46 lines
813 B
HCL
46 lines
813 B
HCL
locals {
|
|
ami_id = var.arch == "arm64" ? data.aws_ami.fedora-coreos-arm[0].image_id : data.aws_ami.fedora-coreos.image_id
|
|
}
|
|
|
|
data "aws_ami" "fedora-coreos" {
|
|
most_recent = true
|
|
owners = ["125523088429"]
|
|
|
|
filter {
|
|
name = "architecture"
|
|
values = ["x86_64"]
|
|
}
|
|
|
|
filter {
|
|
name = "virtualization-type"
|
|
values = ["hvm"]
|
|
}
|
|
|
|
filter {
|
|
name = "description"
|
|
values = ["Fedora CoreOS ${var.os_stream} *"]
|
|
}
|
|
}
|
|
|
|
data "aws_ami" "fedora-coreos-arm" {
|
|
count = var.arch == "arm64" ? 1 : 0
|
|
|
|
most_recent = true
|
|
owners = ["125523088429"]
|
|
|
|
filter {
|
|
name = "architecture"
|
|
values = ["arm64"]
|
|
}
|
|
|
|
filter {
|
|
name = "virtualization-type"
|
|
values = ["hvm"]
|
|
}
|
|
|
|
filter {
|
|
name = "description"
|
|
values = ["Fedora CoreOS ${var.os_stream} *"]
|
|
}
|
|
}
|