From a97bbf712859ab7463c67711753f9ab9a30dc579 Mon Sep 17 00:00:00 2001 From: Dalton Hubble Date: Wed, 16 Aug 2017 19:19:25 -0700 Subject: [PATCH] digital-ocean: Switch droplet tag string to tag reference * Without a reference a Digital Ocean tag object, terraform may try to create a firewall rule before a tag actually exists. By referencing the actual tag objects, the dependency order is implied --- digital-ocean/container-linux/kubernetes/network.tf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/digital-ocean/container-linux/kubernetes/network.tf b/digital-ocean/container-linux/kubernetes/network.tf index 4e596712..b0ce7e8b 100644 --- a/digital-ocean/container-linux/kubernetes/network.tf +++ b/digital-ocean/container-linux/kubernetes/network.tf @@ -23,12 +23,12 @@ resource "digitalocean_firewall" "rules" { { protocol = "udp" port_range = "all" - source_tags = ["${var.cluster_name}-controller", "${var.cluster_name}-worker"] + source_tags = ["${digitalocean_tag.controllers.name}", "${digitalocean_tag.workers.name}"] }, { protocol = "tcp" port_range = "all" - source_tags = ["${var.cluster_name}-controller", "${var.cluster_name}-worker"] + source_tags = ["${digitalocean_tag.controllers.name}", "${digitalocean_tag.workers.name}"] }, ]