Skip to content

Commit

Permalink
feat(ipv6): new resource routeros_ipv6_firewall_nat
Browse files Browse the repository at this point in the history
buengese committed Dec 9, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 4ca4d0d commit 03c2587
Showing 5 changed files with 659 additions and 0 deletions.
1 change: 1 addition & 0 deletions routeros/datasource_ipv6_firewall.go
Original file line number Diff line number Diff line change
@@ -18,6 +18,7 @@ func DatasourceIPv6Firewall() *schema.Resource {
Schema: map[string]*schema.Schema{
MetaSkipFields: PropSkipFields("packets"),

"nat": getIPv6FirewallNatSchema(),
"rules": getIPv6FirewallFilterSchema(),
},
}
246 changes: 246 additions & 0 deletions routeros/datasource_ipv6_firewall_nat.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,246 @@
package routeros

import (
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
)

func getIPv6FirewallNatSchema() *schema.Schema {
return &schema.Schema{
Type: schema.TypeList,
Computed: true,
Optional: true,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
KeyFilter: PropFilterRw,
"id": {
Type: schema.TypeString,
Computed: true,
},
"action": {
Type: schema.TypeString,
Computed: true,
},
"address_list": {
Type: schema.TypeString,
Computed: true,
},
"address_list_timeout": {
Type: schema.TypeString,
Computed: true,
},
"bytes": {
Type: schema.TypeInt,
Computed: true,
},
"chain": {
Type: schema.TypeString,
Computed: true,
},
KeyComment: {
Type: schema.TypeString,
Computed: true,
},
"connection_bytes": {
Type: schema.TypeString,
Computed: true,
},
"connection_limit": {
Type: schema.TypeString,
Computed: true,
},
"connection_mark": {
Type: schema.TypeString,
Computed: true,
},
"connection_rate": {
Type: schema.TypeString,
Computed: true,
},
"connection_type": {
Type: schema.TypeString,
Computed: true,
},
"content": {
Type: schema.TypeString,
Computed: true,
},
KeyDisabled: {
Type: schema.TypeBool,
Computed: true,
},
"dscp": {
Type: schema.TypeInt,
Computed: true,
},
"dst_address": {
Type: schema.TypeString,
Computed: true,
},
"dst_address_list": {
Type: schema.TypeString,
Computed: true,
},
"dst_address_type": {
Type: schema.TypeString,
Computed: true,
},
"dst_limit": {
Type: schema.TypeString,
Computed: true,
},
"dst_port": {
Type: schema.TypeString,
Computed: true,
},
KeyDynamic: {
Type: schema.TypeBool,
Computed: true,
},
"icmp_options": {
Type: schema.TypeString,
Computed: true,
},
"in_bridge_port": {
Type: schema.TypeString,
Computed: true,
},
"in_bridge_port_list": {
Type: schema.TypeString,
Computed: true,
},
"in_interface": {
Type: schema.TypeString,
Computed: true,
},
"in_interface_list": {
Type: schema.TypeString,
Computed: true,
},
"ingress_priority": {
Type: schema.TypeInt,
Computed: true,
},
"invalid": {
Type: schema.TypeBool,
Computed: true,
},
"ipsec_policy": {
Type: schema.TypeString,
Computed: true,
},
"jump_target": {
Type: schema.TypeString,
Computed: true,
},
"limit": {
Type: schema.TypeString,
Computed: true,
},
"log": {
Type: schema.TypeBool,
Computed: true,
},
"log_prefix": {
Type: schema.TypeString,
Computed: true,
},
"nth": {
Type: schema.TypeString,
Computed: true,
},
"out_bridge_port": {
Type: schema.TypeString,
Computed: true,
},
"out_bridge_port_list": {
Type: schema.TypeString,
Computed: true,
},
"out_interface": {
Type: schema.TypeString,
Computed: true,
},
"out_interface_list": {
Type: schema.TypeString,
Computed: true,
},
"packet_mark": {
Type: schema.TypeString,
Computed: true,
},
"packet_size": {
Type: schema.TypeString,
Computed: true,
},
"per_connection_classifier": {
Type: schema.TypeString,
Computed: true,
},
"port": {
Type: schema.TypeString,
Computed: true,
},
"priority": {
Type: schema.TypeInt,
Computed: true,
},
"protocol": {
Type: schema.TypeString,
Computed: true,
},
"random": {
Type: schema.TypeInt,
Computed: true,
},
"routing_mark": {
Type: schema.TypeString,
Computed: true,
},
"src_address": {
Type: schema.TypeString,
Computed: true,
},
"src_address_list": {
Type: schema.TypeString,
Computed: true,
},
"src_address_type": {
Type: schema.TypeString,
Computed: true,
},
"src_port": {
Type: schema.TypeString,
Computed: true,
},
"src_mac_address": {
Type: schema.TypeString,
Computed: true,
},
"tcp_flags": {
Type: schema.TypeString,
Computed: true,
},
"tcp_mss": {
Type: schema.TypeString,
Computed: true,
},
"time": {
Type: schema.TypeString,
Computed: true,
},
"tls_host": {
Type: schema.TypeString,
Computed: true,
},
"to_addresses": {
Type: schema.TypeString,
Computed: true,
},
"to_ports": {
Type: schema.TypeString,
Computed: true,
},
},
},
}
}
1 change: 1 addition & 0 deletions routeros/provider.go
Original file line number Diff line number Diff line change
@@ -132,6 +132,7 @@ func Provider() *schema.Provider {
"routeros_ipv6_dhcp_server_option_sets": ResourceIpv6DhcpServerOptionSets(),
"routeros_ipv6_firewall_addr_list": ResourceIPv6FirewallAddrList(),
"routeros_ipv6_firewall_filter": ResourceIPv6FirewallFilter(),
"routeros_ipv6_firewall_nat": ResourceIPv6FirewallNat(),
"routeros_ipv6_neighbor_discovery": ResourceIPv6NeighborDiscovery(),
"routeros_ipv6_pool": ResourceIpv6Pool(),
"routeros_ipv6_route": ResourceIPv6Route(),
Loading

0 comments on commit 03c2587

Please sign in to comment.