mirror of
https://github.com/puppetmaster/typhoon.git
synced 2024-12-27 23:39:33 +01:00
af27661432
* On platforms that support ARM64 instances, configure controller and worker node host architectures separately * For example, you can run arm64 controllers and amd64 workers * Add `controller_arch` and `worker_arch` variables * Remove `arch` variable
50 lines
900 B
HCL
50 lines
900 B
HCL
locals {
|
|
# Pick a Flatcar Linux AMI
|
|
# flatcar-stable -> Flatcar Linux AMI
|
|
ami_id = var.controller_arch == "arm64" ? data.aws_ami.flatcar-arm64[0].image_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}-*"]
|
|
}
|
|
}
|
|
|
|
data "aws_ami" "flatcar-arm64" {
|
|
count = var.controller_arch == "arm64" ? 1 : 0
|
|
|
|
most_recent = true
|
|
owners = ["075585003325"]
|
|
|
|
filter {
|
|
name = "architecture"
|
|
values = ["arm64"]
|
|
}
|
|
|
|
filter {
|
|
name = "virtualization-type"
|
|
values = ["hvm"]
|
|
}
|
|
|
|
filter {
|
|
name = "name"
|
|
values = ["Flatcar-${local.channel}-*"]
|
|
}
|
|
}
|
|
|