Skip to content

Commit

Permalink
Merge pull request #14 from isovalent/fix-race-condition
Browse files Browse the repository at this point in the history
Fixes a race condition for the external_ips data
  • Loading branch information
darox authored Oct 11, 2023
2 parents 69046b7 + da17c09 commit ebbbab3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ resource "null_resource" "kubeconfig" {
}

data "external" "external_ips" {
depends_on = [
module.main
]
program = ["bash", "-c", "gcloud compute instances list --filter=\"name~${var.name}\" --format=\"json(networkInterfaces[0].accessConfigs[0].natIP)\" | jq 'to_entries | map({key: (.key|tostring), value: (.value|tostring)}) | from_entries'"]
}

Expand Down

0 comments on commit ebbbab3

Please sign in to comment.