You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Trying to modify a firewall rule from an address group to an address results in Unifi returning an error api.err.FirewallRuleCannotMixAddressWithAddressGroup. Filling out all the possible src attributes still results in the same error.
Comparing the .tfstate of two firewall rules created in Unifi, then imported, one with an ip address, and one with groups, shows that only src_address, src_firewall_group_ids, dst_address, dst_firewall_group_ids are meaningful different so I dont think I am missing an attribute that needs to be set. Setting the *group_ids to null also has no effect.
Also strictly creating the resource in Terraform and then modifying it produces the same error.
There seems to be a missing attribute in the Unifi provider that allows for switching the type from group to address to network, as there is this option in the Unifi Controller. The current workaround to destroy the firewall rule, then recreate it with the type, or just update it in Unifi.
r_firewall_rules.tf
resource"unifi_firewall_rule""lan_in_allow_h_u" {
name="Allow H to U"action="accept"rule_index=2004ruleset="LAN_IN"protocol="all"enabled=true# Sourcesrc_firewall_group_ids=["63882be747c2b02d711119bf"]
# src_address = "10.10.100.2"# Destinationdst_firewall_group_ids=["61bc647a47c2b0311608c2e1"]
# dst_address = "192.164.1.14"# Matchingstate_established=truestate_related=truestate_new=true
}
Trying to modify a firewall rule from an address group to an address results in Unifi returning an error
api.err.FirewallRuleCannotMixAddressWithAddressGroup
. Filling out all the possible src attributes still results in the same error.Comparing the
.tfstate
of two firewall rules created in Unifi, then imported, one with an ip address, and one with groups, shows that onlysrc_address
,src_firewall_group_ids
,dst_address
,dst_firewall_group_ids
are meaningful different so I dont think I am missing an attribute that needs to be set. Setting the*group_ids
tonull
also has no effect.Also strictly creating the resource in Terraform and then modifying it produces the same error.
There seems to be a missing attribute in the Unifi provider that allows for switching the type from group to address to network, as there is this option in the Unifi Controller. The current workaround to destroy the firewall rule, then recreate it with the type, or just update it in Unifi.
r_firewall_rules.tf
.tfstate
The text was updated successfully, but these errors were encountered: