From 7e153dfdea43788000cf512a08174d29b7f2d54f Mon Sep 17 00:00:00 2001 From: Luke Browning Date: Fri, 28 Jul 2023 23:28:24 -0700 Subject: [PATCH] Regenerate data-source docs --- docs/data-sources/interfaces_vlan.md | 25 +++++++++++-- docs/data-sources/route.md | 21 +++++++++-- docs/data-sources/unbound_domain_override.md | 23 ++++++++++-- docs/data-sources/unbound_forward.md | 24 ++++++++++-- docs/data-sources/unbound_host_alias.md | 35 ++++++++++++++++-- docs/data-sources/unbound_host_override.md | 39 ++++++++++++++++++-- 6 files changed, 148 insertions(+), 19 deletions(-) diff --git a/docs/data-sources/interfaces_vlan.md b/docs/data-sources/interfaces_vlan.md index 8429cff..33927b2 100644 --- a/docs/data-sources/interfaces_vlan.md +++ b/docs/data-sources/interfaces_vlan.md @@ -1,7 +1,6 @@ --- -# generated by https://github.com/hashicorp/terraform-plugin-docs page_title: "opnsense_interfaces_vlan Data Source - terraform-provider-opnsense" -subcategory: "" +subcategory: Interfaces description: |- VLANs (Virtual LANs) can be used to segment a single physical network into multiple virtual networks. --- @@ -10,7 +9,26 @@ description: |- VLANs (Virtual LANs) can be used to segment a single physical network into multiple virtual networks. - +## Example Usage + +```terraform +// OPNsense generates a device name +resource "opnsense_interfaces_vlan" "vlan" { + description = "Example vlan" + tag = 10 + priority = 0 + parent = "vtnet0" +} + +// Manually configure a device name +resource "opnsense_interfaces_vlan" "vlan04" { + description = "Example vlan 4" + tag = 50 + priority = 5 + parent = "vtnet0" + device = "vlan04" +} +``` ## Schema @@ -27,4 +45,3 @@ VLANs (Virtual LANs) can be used to segment a single physical network into multi - `priority` (Number) 802.1Q VLAN PCP (priority code point). - `tag` (Number) 802.1Q VLAN tag. - diff --git a/docs/data-sources/route.md b/docs/data-sources/route.md index a5046c5..6d38255 100644 --- a/docs/data-sources/route.md +++ b/docs/data-sources/route.md @@ -1,7 +1,6 @@ --- -# generated by https://github.com/hashicorp/terraform-plugin-docs page_title: "opnsense_route Data Source - terraform-provider-opnsense" -subcategory: "" +subcategory: Routes description: |- Routes can be used to teach your firewall which path it should take when forwarding packets to a specific network. --- @@ -10,7 +9,24 @@ description: |- Routes can be used to teach your firewall which path it should take when forwarding packets to a specific network. +## Example Usage +```terraform +// Enabled with description +resource "opnsense_route" "one_route" { + description = "Example route" + gateway = "LAN_DHCP" + network = "10.9.0.0/24" +} + +// Disabled without description +resource "opnsense_route" "two_route" { + enabled = false + + gateway = "LAN" + network = "10.10.0.0/24" +} +``` ## Schema @@ -26,4 +42,3 @@ Routes can be used to teach your firewall which path it should take when forward - `gateway` (String) Which gateway this route applies, e.g. `WAN`. - `network` (String) Destination network for this static route. - diff --git a/docs/data-sources/unbound_domain_override.md b/docs/data-sources/unbound_domain_override.md index a8ce34c..f0bcf74 100644 --- a/docs/data-sources/unbound_domain_override.md +++ b/docs/data-sources/unbound_domain_override.md @@ -1,7 +1,6 @@ --- -# generated by https://github.com/hashicorp/terraform-plugin-docs page_title: "opnsense_unbound_domain_override Data Source - terraform-provider-opnsense" -subcategory: "" +subcategory: Unbound description: |- Domain overrides can be used to forward queries for specific domains (and subsequent subdomains) to local or remote DNS servers. --- @@ -10,7 +9,26 @@ description: |- Domain overrides can be used to forward queries for specific domains (and subsequent subdomains) to local or remote DNS servers. +## Example Usage +```terraform +// Enabled with description +resource "opnsense_unbound_domain_override" "one_override" { + enabled = true + description = "Example override" + + domain = "example.lan" + server = "192.168.1.1" +} + +// Disabled without description +resource "opnsense_unbound_domain_override" "two_override" { + enabled = false + + domain = "example.arpa" + server = "192.168.1.100" +} +``` ## Schema @@ -26,4 +44,3 @@ Domain overrides can be used to forward queries for specific domains (and subseq - `enabled` (Boolean) Whether this route is enabled. - `server` (String) IP address of the authoritative DNS server for this domain, e.g. `192.168.100.100`. - diff --git a/docs/data-sources/unbound_forward.md b/docs/data-sources/unbound_forward.md index 90e6cbb..8bd7339 100644 --- a/docs/data-sources/unbound_forward.md +++ b/docs/data-sources/unbound_forward.md @@ -1,7 +1,6 @@ --- -# generated by https://github.com/hashicorp/terraform-plugin-docs page_title: "opnsense_unbound_forward Data Source - terraform-provider-opnsense" -subcategory: "" +subcategory: Unbound description: |- Query Forwarding section allows for entering arbitrary nameservers to forward queries to. Can forward queries normally, or over TLS. --- @@ -10,7 +9,27 @@ description: |- Query Forwarding section allows for entering arbitrary nameservers to forward queries to. Can forward queries normally, or over TLS. +## Example Usage +```terraform +// Query Forward +resource "opnsense_unbound_forward" "query" { + domain = "example.lan" + server_ip = "192.168.1.2" + server_port = 853 +} + +// DoT forward +resource "opnsense_unbound_forward" "dot" { + enabled = false + type = "dot" + + domain = "example.dev" + server_ip = "192.168.1.1" + server_port = 53 + verify_cn = "example.dev" +} +``` ## Schema @@ -27,4 +46,3 @@ Query Forwarding section allows for entering arbitrary nameservers to forward qu - `server_port` (Number) Port of DNS server, for usual DNS use `53`, if you use DoT set it to `853`. - `verify_cn` (String) The Common Name of the DNS server (e.g. `dns.example.com`). This field is required to verify its TLS certificate. DNS-over-TLS is susceptible to man-in-the-middle attacks unless certificates can be verified. - diff --git a/docs/data-sources/unbound_host_alias.md b/docs/data-sources/unbound_host_alias.md index 504f786..98c26eb 100644 --- a/docs/data-sources/unbound_host_alias.md +++ b/docs/data-sources/unbound_host_alias.md @@ -1,7 +1,6 @@ --- -# generated by https://github.com/hashicorp/terraform-plugin-docs page_title: "opnsense_unbound_host_alias Data Source - terraform-provider-opnsense" -subcategory: "" +subcategory: Unbound description: |- Host aliases can be used to create alternative names for a Host. --- @@ -10,7 +9,38 @@ description: |- Host aliases can be used to create alternative names for a Host. +## Example Usage +```terraform +// 'A' record +resource "opnsense_unbound_host_override" "a_override" { + enabled = true + description = "A record override" + + hostname = "*" + domain = "example.com" + server = "192.168.1.1" +} + +// Enabled alias with description +resource "opnsense_unbound_host_alias" "one_alias" { + override = opnsense_unbound_host_override.a_override.id + + enabled = true + hostname = "*" + domain = "1.example.com" + description = "Example 1" +} + +// Disabled alias without description +resource "opnsense_unbound_host_alias" "two_alias" { + override = opnsense_unbound_host_override.a_override.id + + enabled = false + hostname = "*" + domain = "2.example.com" +} +``` ## Schema @@ -27,4 +57,3 @@ Host aliases can be used to create alternative names for a Host. - `hostname` (String) Name of the host, without the domain part. - `override` (String) The associated host override to apply this alias on. - diff --git a/docs/data-sources/unbound_host_override.md b/docs/data-sources/unbound_host_override.md index f7fd2d1..1cc83ea 100644 --- a/docs/data-sources/unbound_host_override.md +++ b/docs/data-sources/unbound_host_override.md @@ -1,7 +1,6 @@ --- -# generated by https://github.com/hashicorp/terraform-plugin-docs page_title: "opnsense_unbound_host_override Data Source - terraform-provider-opnsense" -subcategory: "" +subcategory: Unbound description: |- Host overrides can be used to change DNS results from client queries or to add custom DNS records. --- @@ -10,7 +9,42 @@ description: |- Host overrides can be used to change DNS results from client queries or to add custom DNS records. +## Example Usage +```terraform +// 'A' record +resource "opnsense_unbound_host_override" "a_override" { + enabled = true + description = "A record override" + + hostname = "*" + domain = "example.com" + server = "192.168.1.1" +} + +// 'AAAA' record +resource "opnsense_unbound_host_override" "aaaa_override" { + enabled = true + + type = "AAAA" + hostname = "*" + domain = "example.com" + server = "fd00:abcd::1" +} + +// 'MX' record +resource "opnsense_unbound_host_override" "mx_override" { + enabled = false + description = "MX record override" + + type = "MX" + hostname = "*" + domain = "example.com" + + mx_priority = 10 + mx_host = "mail.example.dev" +} +``` ## Schema @@ -30,4 +64,3 @@ Host overrides can be used to change DNS results from client queries or to add c - `server` (String) IP address of the host, e.g. 192.168.100.100 or fd00:abcd::1. - `type` (String) Type of resource record. Available values: `A`, `AAAA`, `MX`. -