From 47a998992787f337ba4b1bff211702a8791691b4 Mon Sep 17 00:00:00 2001 From: Dalton Hubble Date: Mon, 6 Nov 2017 00:39:02 -0800 Subject: [PATCH] Fix null_resource ordering constraints * Ensure etcd TLS assets and kubeconfig are copied before any attempt is made to run bootkube start --- digital-ocean/container-linux/kubernetes/ssh.tf | 2 +- google-cloud/container-linux/kubernetes/ssh.tf | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/digital-ocean/container-linux/kubernetes/ssh.tf b/digital-ocean/container-linux/kubernetes/ssh.tf index 17e37b39..d232fd50 100644 --- a/digital-ocean/container-linux/kubernetes/ssh.tf +++ b/digital-ocean/container-linux/kubernetes/ssh.tf @@ -69,7 +69,7 @@ resource "null_resource" "copy-secrets" { # Secure copy bootkube assets to ONE controller and start bootkube to perform # one-time self-hosted cluster bootstrapping. resource "null_resource" "bootkube-start" { - depends_on = ["module.bootkube", "null_resource.copy-secrets", "digitalocean_droplet.controllers"] + depends_on = ["module.bootkube", "null_resource.copy-secrets"] connection { type = "ssh" diff --git a/google-cloud/container-linux/kubernetes/ssh.tf b/google-cloud/container-linux/kubernetes/ssh.tf index 9b91ed3e..7dbde7c1 100644 --- a/google-cloud/container-linux/kubernetes/ssh.tf +++ b/google-cloud/container-linux/kubernetes/ssh.tf @@ -1,6 +1,6 @@ # Secure copy etcd TLS assets and kubeconfig to controllers. Activates kubelet.service resource "null_resource" "copy-secrets" { - depends_on = ["module.controllers", "module.bootkube"] + depends_on = ["module.bootkube"] count = "${var.controller_count}" connection { @@ -70,7 +70,7 @@ resource "null_resource" "copy-secrets" { # Secure copy bootkube assets to ONE controller and start bootkube to perform # one-time self-hosted cluster bootstrapping. resource "null_resource" "bootkube-start" { - depends_on = ["module.controllers", "module.workers", "module.bootkube"] + depends_on = ["module.bootkube", "module.workers", "null_resource.copy-secrets"] connection { type = "ssh"