From 9e9ae1c2746b2a6c1671a62d254c0b5138e8b5a1 Mon Sep 17 00:00:00 2001 From: Philip Schmid Date: Mon, 6 Nov 2023 19:30:16 +0100 Subject: [PATCH] Set static AMI ID Signed-off-by: Philip Schmid --- 00-locals.tf | 16 ++++++++-------- 03-talos.tf | 4 ++-- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/00-locals.tf b/00-locals.tf index 7d3283a..ccb72ce 100644 --- a/00-locals.tf +++ b/00-locals.tf @@ -1,12 +1,12 @@ -data "aws_ami" "talos" { - owners = ["540036508848"] # Sidero Labs - most_recent = true +# data "aws_ami" "talos" { +# owners = ["540036508848"] # Sidero Labs +# most_recent = true - filter { - name = "name" - values = ["talos-v1.5.3-eu-west-1-amd64"] - } -} +# filter { +# name = "name" +# values = ["talos-v1.5.3-eu-west-1-amd64"] +# } +# } resource "random_string" "workspace_id" { length = 6 diff --git a/03-talos.tf b/03-talos.tf index b8c468e..cf3b17e 100644 --- a/03-talos.tf +++ b/03-talos.tf @@ -5,7 +5,7 @@ module "talos_control_plane_nodes" { count = var.controlplane_count name = "${var.cluster_name}-control-plane-${count.index}" - ami = data.aws_ami.talos.id + ami = "ami-0abce8fa3a7f21d18" instance_type = var.control_plane.instance_type subnet_id = element(data.aws_subnets.public.ids, count.index) associate_public_ip_address = true @@ -27,7 +27,7 @@ module "talos_worker_group" { for_each = merge([for info in var.worker_groups : { for index in range(0, var.workers_count) : "${info.name}.${index}" => info }]...) name = "${var.cluster_name}-worker-group-${each.value.name}-${trimprefix(each.key, "${each.value.name}.")}" - ami = data.aws_ami.talos.id + ami = "ami-0abce8fa3a7f21d18" instance_type = each.value.instance_type subnet_id = element(data.aws_subnets.public.ids, tonumber(trimprefix(each.key, "${each.value.name}."))) associate_public_ip_address = true