feat: add network_isolation_enabled and deprecate intra_network_access_enabled

This commit is contained in:
Mateusz Filipowicz
2025-01-21 20:29:25 +01:00
committed by Mateusz Filipowicz
parent aa0ff2bb38
commit 7e222cb061
3 changed files with 515 additions and 858 deletions

View File

@@ -258,6 +258,13 @@ func resourceNetwork() *schema.Resource {
Type: schema.TypeBool,
Optional: true,
Default: true,
Deprecated: "This will attribute will be removed in a future release, because it is no longer supported Use `network_isolation_enabled` instead.",
},
"network_isolation_enabled": {
Description: "Isolates this network from all other virtual networks using firewall rules. Devices on this network are able to communicate with each other. Use this instead of `intra_network_access_enabled`.",
Type: schema.TypeBool,
Optional: true,
Default: true,
},
"ipv6_ra_preferred_lifetime": {
Description: "Lifetime in which the address can be used. Address becomes deprecated afterwards. Must be lower than or equal to `ipv6_ra_valid_lifetime`",
@@ -466,8 +473,8 @@ func resourceNetworkGetResourceData(d *schema.ResourceData, meta interface{}) (*
IPV6RaPriority: d.Get("ipv6_ra_priority").(string),
IPV6RaValidLifetime: d.Get("ipv6_ra_valid_lifetime").(int),
InternetAccessEnabled: d.Get("internet_access_enabled").(bool),
IntraNetworkAccessEnabled: d.Get("intra_network_access_enabled").(bool),
InternetAccessEnabled: d.Get("internet_access_enabled").(bool),
NetworkIsolationEnabled: d.Get("network_isolation_enabled").(bool),
WANIP: d.Get("wan_ip").(string),
WANType: d.Get("wan_type").(string),
@@ -586,7 +593,7 @@ func resourceNetworkSetResourceData(resp *unifi.Network, d *schema.ResourceData,
d.Set("domain_name", resp.DomainName)
d.Set("igmp_snooping", resp.IGMPSnooping)
d.Set("internet_access_enabled", resp.InternetAccessEnabled)
d.Set("intra_network_access_enabled", resp.IntraNetworkAccessEnabled)
d.Set("network_isolation_enabled", resp.NetworkIsolationEnabled)
d.Set("ipv6_interface_type", resp.IPV6InterfaceType)
d.Set("ipv6_pd_interface", resp.IPV6PDInterface)
d.Set("ipv6_pd_prefixid", resp.IPV6PDPrefixid)