Page MenuHomePhabricator

D12730.id.diff
No OneTemporary

D12730.id.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
Wed, Dec 25, 1:47 AM (3 h, 1 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2701323
Default Alt Text
D12730.id.diff (878 B)

Event Timeline