Skip to content

Commit 3491122

Browse files
authored
BREAKING CHANGE: For fabric-net-firewall, renamed enable_logging variable to replace with flow_logs config (#212)
1 parent 26507ba commit 3491122

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

modules/fabric-net-firewall/main.tf

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,15 @@ resource "google_compute_firewall" "custom" {
131131
target_service_accounts = each.value.use_service_accounts ? each.value.targets : null
132132
disabled = lookup(each.value.extra_attributes, "disabled", false)
133133
priority = lookup(each.value.extra_attributes, "priority", 1000)
134-
enable_logging = lookup(each.value.extra_attributes, "enable_logging", null)
134+
135+
dynamic "log_config" {
136+
for_each = lookup(each.value, "flow_logs", false) ? [{
137+
metadata = lookup(each.value, "flow_logs_metadata", "INCLUDE_ALL_METADATA")
138+
}] : []
139+
content {
140+
metadata = log_config.value.metadata
141+
}
142+
}
135143

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

0 commit comments

Comments
 (0)