Created
September 30, 2021 15:46
-
-
Save nvibert/c49282f29c1cd7e7ce2d4756a0a34440 to your computer and use it in GitHub Desktop.
Prototype of Fortinet CTS Module
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
resource "fortios_firewall_address" "consul_service" { | |
for_each = var.services | |
name = each.value.id | |
subnet = "${each.value.address} ${lookup(each.value.meta, "subnet_mask", "255.255.255.255")}" | |
type = "ipmask" | |
visibility = "enable" | |
} | |
resource "fortios_firewall_addrgrp" "ctsAddrGroup" { | |
allow_routing = "disable" | |
color = 0 | |
exclude = "disable" | |
name = "groupCts" | |
visibility = "enable" | |
dynamic "member" { | |
for_each = fortios_firewall_address.consul_service | |
content { | |
name = member.value["name"] | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment