Skip to content

Commit

Permalink
BREAKING CHANGE: For fabric-net-firewall, renamed enable_logging vari…
Browse files Browse the repository at this point in the history
…able to replace with flow_logs config (#212)
  • Loading branch information
jtyr authored Jan 11, 2021
1 parent 26507ba commit 3491122
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion modules/fabric-net-firewall/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,15 @@ resource "google_compute_firewall" "custom" {
target_service_accounts = each.value.use_service_accounts ? each.value.targets : null
disabled = lookup(each.value.extra_attributes, "disabled", false)
priority = lookup(each.value.extra_attributes, "priority", 1000)
enable_logging = lookup(each.value.extra_attributes, "enable_logging", null)

dynamic "log_config" {
for_each = lookup(each.value, "flow_logs", false) ? [{
metadata = lookup(each.value, "flow_logs_metadata", "INCLUDE_ALL_METADATA")
}] : []
content {
metadata = log_config.value.metadata
}
}

dynamic "allow" {
for_each = [for rule in each.value.rules : rule if each.value.action == "allow"]
Expand Down

0 comments on commit 3491122

Please sign in to comment.