mirror of
https://github.com/2martens/terraform.git
synced 2026-10-17 19:06:51 +02:00
Wait with installation until helm and microk8s are available
This commit is contained in:
@@ -4,7 +4,12 @@ resource "null_resource" "install_setup" {
|
||||
user = "terraform"
|
||||
type = "ssh"
|
||||
private_key = var.terraform_private_ssh_key
|
||||
timeout = "2m"
|
||||
timeout = "10m"
|
||||
}
|
||||
|
||||
provisioner "remote-exec" {
|
||||
interpreter = ["bash", "-c"]
|
||||
command = "while (test -z `command -v helm`); do echo \"Waiting for cloud init to finish...\";sleep 5;done"
|
||||
}
|
||||
|
||||
provisioner "file" {
|
||||
@@ -48,7 +53,12 @@ resource "null_resource" "install_argocd_single" {
|
||||
user = "terraform"
|
||||
type = "ssh"
|
||||
private_key = var.terraform_private_ssh_key
|
||||
timeout = "2m"
|
||||
timeout = "10m"
|
||||
}
|
||||
|
||||
provisioner "remote-exec" {
|
||||
interpreter = ["bash", "-c"]
|
||||
command = "while (test -z `command -v helm`); do echo \"Waiting for cloud init to finish...\";sleep 5;done"
|
||||
}
|
||||
|
||||
provisioner "remote-exec" {
|
||||
@@ -70,7 +80,12 @@ resource "null_resource" "install_argocd_ha" {
|
||||
user = "terraform"
|
||||
type = "ssh"
|
||||
private_key = var.terraform_private_ssh_key
|
||||
timeout = "2m"
|
||||
timeout = "10m"
|
||||
}
|
||||
|
||||
provisioner "remote-exec" {
|
||||
interpreter = ["bash", "-c"]
|
||||
command = "while (test -z `command -v helm`); do echo \"Waiting for cloud init to finish...\";sleep 5;done"
|
||||
}
|
||||
|
||||
provisioner "file" {
|
||||
|
||||
@@ -119,7 +119,7 @@ resource "null_resource" "setup_tokens" {
|
||||
user = "terraform"
|
||||
type = "ssh"
|
||||
private_key = var.terraform_private_ssh_key
|
||||
timeout = "2m"
|
||||
timeout = "10m"
|
||||
}
|
||||
|
||||
provisioner "local-exec" {
|
||||
@@ -130,6 +130,11 @@ resource "null_resource" "setup_tokens" {
|
||||
EOT
|
||||
}
|
||||
|
||||
provisioner "remote-exec" {
|
||||
interpreter = ["bash", "-c"]
|
||||
command = "while (test -z `command -v microk8s`); do echo \"Waiting for cloud init to finish...\";sleep 5;done"
|
||||
}
|
||||
|
||||
provisioner "file" {
|
||||
content = templatefile("${path.module}/templates/add-node.sh",
|
||||
{
|
||||
@@ -166,6 +171,11 @@ resource "null_resource" "join_nodes" {
|
||||
command = "while [[ $(cat /tmp/current_joining_node.txt) != \"${count.index + 1}\" ]]; do echo \"${count.index + 1} is waiting...\";sleep 5;done"
|
||||
}
|
||||
|
||||
provisioner "remote-exec" {
|
||||
interpreter = ["bash", "-c"]
|
||||
command = "while (test -z `command -v microk8s`); do echo \"Waiting for cloud init to finish...\";sleep 5;done"
|
||||
}
|
||||
|
||||
provisioner "file" {
|
||||
content = templatefile("${path.module}/templates/join.sh",
|
||||
{
|
||||
|
||||
@@ -101,6 +101,11 @@ resource "null_resource" "join_workers" {
|
||||
command = "while [[ $(cat /tmp/current_joining_worker_node.txt) != \"${count.index}\" ]]; do echo \"${count.index} is waiting...\";sleep 5;done"
|
||||
}
|
||||
|
||||
provisioner "remote-exec" {
|
||||
interpreter = ["bash", "-c"]
|
||||
command = "while (test -z `command -v microk8s`); do echo \"Waiting for cloud init to finish...\";sleep 5;done"
|
||||
}
|
||||
|
||||
provisioner "file" {
|
||||
content = templatefile("${path.module}/templates/join-worker.sh",
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user