Skip to content

Commit

Permalink
Make cleanup_compute_nodes depends_on on network
Browse files Browse the repository at this point in the history
  • Loading branch information
mr0re1 committed Jan 11, 2024
1 parent a75c5b5 commit 4d63496
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,7 @@ module "slurm_controller_instance" {
static_ips = var.static_ips
subnetwork = var.subnetwork_self_link
zone = var.zone

metadata = var.metadata
metadata = var.metadata

depends_on = [
module.slurm_files,
Expand Down Expand Up @@ -155,6 +154,11 @@ module "cleanup_compute_nodes" {
slurm_cluster_name = local.slurm_cluster_name
project_id = var.project_id
when_destroy = true

# Depend on controller network, as a best effort to avoid
# subnetwork resourceInUseByAnotherResource error
# NOTE: Can not use nodeset subnetworks as "A static list expression is required"
depends_on = [var.subnetwork_self_link]
}


Expand Down

0 comments on commit 4d63496

Please sign in to comment.