Skip to content

Commit

Permalink
Set explicit depencendy to ami data source
Browse files Browse the repository at this point in the history
Signed-off-by: Philip Schmid <philip.schmid@isovalent.com>
  • Loading branch information
PhilipSchmid committed Nov 3, 2023
1 parent 0cef2c2 commit c9dee60
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions 03-talos.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ module "talos_control_plane_nodes" {

count = var.controlplane_count

depends_on = [
data.data.aws_ami.talos
]

name = "${var.cluster_name}-control-plane-${count.index}"
ami = local.ami_id
monitoring = true
Expand All @@ -27,6 +31,10 @@ 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 }]...)

depends_on = [
data.data.aws_ami.talos
]

name = "${var.cluster_name}-worker-group-${each.value.name}-${trimprefix(each.key, "${each.value.name}.")}"
ami = local.ami_id
monitoring = true
Expand Down

0 comments on commit c9dee60

Please sign in to comment.