mirror of
https://github.com/puppetmaster/typhoon.git
synced 2024-12-26 04:09:34 +01:00
2ba0181dbe
* Replace v0.11 bracket type hints with Terraform v0.12 list expressions * Use expression syntax instead of interpolated strings, where suggested * Update AWS tutorial and worker pools documentation * Define Terraform and plugin version requirements in versions.tf * Require aws ~> 2.7 to support Terraform v0.12 * Require ct ~> 0.3.2 to support Terraform v0.12
51 lines
943 B
HCL
51 lines
943 B
HCL
locals {
|
|
# Pick a CoreOS Container Linux derivative
|
|
# coreos-stable -> Container Linux AMI
|
|
# flatcar-stable -> Flatcar Linux AMI
|
|
ami_id = local.flavor == "flatcar" ? data.aws_ami.flatcar.image_id : data.aws_ami.coreos.image_id
|
|
|
|
flavor = element(split("-", var.os_image), 0)
|
|
channel = element(split("-", var.os_image), 1)
|
|
}
|
|
|
|
data "aws_ami" "coreos" {
|
|
most_recent = true
|
|
owners = ["595879546273"]
|
|
|
|
filter {
|
|
name = "architecture"
|
|
values = ["x86_64"]
|
|
}
|
|
|
|
filter {
|
|
name = "virtualization-type"
|
|
values = ["hvm"]
|
|
}
|
|
|
|
filter {
|
|
name = "name"
|
|
values = ["CoreOS-${local.channel}-*"]
|
|
}
|
|
}
|
|
|
|
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}-*"]
|
|
}
|
|
}
|
|
|