Edit digital ocean port range and ordering to suppress diff

* Change port range from keyword "all" to "1-65535", which is the
same but with digitalocean provider 0.1.3 doesn't produce a diff
* Rearrange egress firewall rules to order the Digtial Ocean API
and provider returns. In current testing, this fixes the last diff
that was present on `terraform plan`.
This commit is contained in:
Dalton Hubble 2018-01-15 21:27:06 -08:00
parent f5efcc1ff8
commit ef18f19ec4
1 changed files with 7 additions and 6 deletions

View File

@ -22,12 +22,12 @@ resource "digitalocean_firewall" "rules" {
},
{
protocol = "udp"
port_range = "all"
port_range = "1-65535"
source_tags = ["${digitalocean_tag.controllers.name}", "${digitalocean_tag.workers.name}"]
},
{
protocol = "tcp"
port_range = "all"
port_range = "1-65535"
source_tags = ["${digitalocean_tag.controllers.name}", "${digitalocean_tag.workers.name}"]
},
]
@ -35,17 +35,18 @@ resource "digitalocean_firewall" "rules" {
# allow all outbound traffic
outbound_rule = [
{
protocol = "icmp"
protocol = "tcp"
port_range = "1-65535"
destination_addresses = ["0.0.0.0/0", "::/0"]
},
{
protocol = "udp"
port_range = "all"
port_range = "1-65535"
destination_addresses = ["0.0.0.0/0", "::/0"]
},
{
protocol = "tcp"
port_range = "all"
protocol = "icmp"
port_range = "1-65535"
destination_addresses = ["0.0.0.0/0", "::/0"]
},
]