Skip to content

Commit

Permalink
Set static AMI ID
Browse files Browse the repository at this point in the history
Signed-off-by: Philip Schmid <[email protected]>
  • Loading branch information
PhilipSchmid committed Nov 6, 2023
1 parent e4ee5dc commit 9e9ae1c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
16 changes: 8 additions & 8 deletions 00-locals.tf
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions 03-talos.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 9e9ae1c

Please sign in to comment.