Adding firewall stuff
This commit is contained in:
parent
2133c1ff3e
commit
d7038e26b9
@ -12,6 +12,17 @@ resource vultr_firewall_rule web_v4 {
|
|||||||
port = each.value
|
port = each.value
|
||||||
}
|
}
|
||||||
|
|
||||||
|
resource vultr_firewall_rule web_v6 {
|
||||||
|
for_each = toset(["80", "443"])
|
||||||
|
firewall_group_id = vultr_firewall_group.host.id
|
||||||
|
protocol = "tcp"
|
||||||
|
ip_type = "v6"
|
||||||
|
subnet = "::"
|
||||||
|
subnet_size = 0
|
||||||
|
port = each.value
|
||||||
|
}
|
||||||
|
|
||||||
|
# Turn this off when we're not doing maintenance
|
||||||
resource vultr_firewall_rule ssh_v4 {
|
resource vultr_firewall_rule ssh_v4 {
|
||||||
count = var.enable_ssh ? 1 : 0
|
count = var.enable_ssh ? 1 : 0
|
||||||
firewall_group_id = vultr_firewall_group.host.id
|
firewall_group_id = vultr_firewall_group.host.id
|
||||||
|
@ -17,4 +17,5 @@ resource "vultr_instance" "websites" {
|
|||||||
hour = var.host.backups.hour
|
hour = var.host.backups.hour
|
||||||
}
|
}
|
||||||
ssh_key_ids = [ vultr_ssh_key.host.id ]
|
ssh_key_ids = [ vultr_ssh_key.host.id ]
|
||||||
|
firewall_group_id = vultr_firewall_group.host.id
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user