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
This commit is contained in:
Dalton Hubble 2017-08-16 19:19:25 -07:00
parent dc3ff174ea
commit a97bbf7128
1 changed files with 2 additions and 2 deletions

View File

@ -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}"]
},
]