Page MenuHomePhabricator

D12730.diff
No OneTemporary

D12730.diff

diff --git a/services/terraform/self-host/keyserver_secondary.tf b/services/terraform/self-host/keyserver_secondary.tf
--- a/services/terraform/self-host/keyserver_secondary.tf
+++ b/services/terraform/self-host/keyserver_secondary.tf
@@ -126,6 +126,21 @@
operating_system_family = "LINUX"
}
+ # Wait indefinitely for primary service to become healthy before deploying secondary service
+ provisioner "local-exec" {
+ command = <<EOT
+ while true; do
+ if curl --silent --output /dev/null --fail "https://${var.domain_name}/health"; then
+ echo "Primary service is healthy. Proceeding with deployment of secondary service."
+ exit 0
+ else
+ echo "Primary service is not healthy yet. Waiting 10 seconds before checking again..."
+ sleep 10
+ fi
+ done
+ EOT
+ }
+
skip_destroy = false
}

File Metadata

Mime Type
text/plain
Expires
Sat, Nov 23, 7:46 PM (16 h, 13 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2572256
Default Alt Text
D12730.diff (878 B)

Event Timeline