From fcfa77e30d8c132cabb89175ad406aa63d5126ad Mon Sep 17 00:00:00 2001 From: Luke Browning Date: Sat, 29 Jul 2023 02:17:51 -0700 Subject: [PATCH 1/2] Remove reference to resource example in data-source templates --- templates/data-sources/interfaces_vlan.md.tmpl | 4 ---- templates/data-sources/route.md.tmpl | 4 ---- templates/data-sources/unbound_domain_override.md.tmpl | 4 ---- templates/data-sources/unbound_forward.md.tmpl | 4 ---- templates/data-sources/unbound_host_alias.md.tmpl | 4 ---- templates/data-sources/unbound_host_override.md.tmpl | 4 ---- 6 files changed, 24 deletions(-) diff --git a/templates/data-sources/interfaces_vlan.md.tmpl b/templates/data-sources/interfaces_vlan.md.tmpl index cc32c7f..eb5e19f 100644 --- a/templates/data-sources/interfaces_vlan.md.tmpl +++ b/templates/data-sources/interfaces_vlan.md.tmpl @@ -9,10 +9,6 @@ description: |- {{ .Description | trimspace }} -## Example Usage - -{{ tffile (printf "%s%s%s" "examples/resources/" .Name "/resource.tf") }} - {{ .SchemaMarkdown | trimspace }} {{ if .HasImport -}} diff --git a/templates/data-sources/route.md.tmpl b/templates/data-sources/route.md.tmpl index e92be36..c0c2319 100644 --- a/templates/data-sources/route.md.tmpl +++ b/templates/data-sources/route.md.tmpl @@ -9,10 +9,6 @@ description: |- {{ .Description | trimspace }} -## Example Usage - -{{ tffile (printf "%s%s%s" "examples/resources/" .Name "/resource.tf") }} - {{ .SchemaMarkdown | trimspace }} {{ if .HasImport -}} diff --git a/templates/data-sources/unbound_domain_override.md.tmpl b/templates/data-sources/unbound_domain_override.md.tmpl index 3d71783..22114ff 100644 --- a/templates/data-sources/unbound_domain_override.md.tmpl +++ b/templates/data-sources/unbound_domain_override.md.tmpl @@ -9,10 +9,6 @@ description: |- {{ .Description | trimspace }} -## Example Usage - -{{ tffile (printf "%s%s%s" "examples/resources/" .Name "/resource.tf") }} - {{ .SchemaMarkdown | trimspace }} {{ if .HasImport -}} diff --git a/templates/data-sources/unbound_forward.md.tmpl b/templates/data-sources/unbound_forward.md.tmpl index 3d71783..22114ff 100644 --- a/templates/data-sources/unbound_forward.md.tmpl +++ b/templates/data-sources/unbound_forward.md.tmpl @@ -9,10 +9,6 @@ description: |- {{ .Description | trimspace }} -## Example Usage - -{{ tffile (printf "%s%s%s" "examples/resources/" .Name "/resource.tf") }} - {{ .SchemaMarkdown | trimspace }} {{ if .HasImport -}} diff --git a/templates/data-sources/unbound_host_alias.md.tmpl b/templates/data-sources/unbound_host_alias.md.tmpl index 3d71783..22114ff 100644 --- a/templates/data-sources/unbound_host_alias.md.tmpl +++ b/templates/data-sources/unbound_host_alias.md.tmpl @@ -9,10 +9,6 @@ description: |- {{ .Description | trimspace }} -## Example Usage - -{{ tffile (printf "%s%s%s" "examples/resources/" .Name "/resource.tf") }} - {{ .SchemaMarkdown | trimspace }} {{ if .HasImport -}} diff --git a/templates/data-sources/unbound_host_override.md.tmpl b/templates/data-sources/unbound_host_override.md.tmpl index 3d71783..22114ff 100644 --- a/templates/data-sources/unbound_host_override.md.tmpl +++ b/templates/data-sources/unbound_host_override.md.tmpl @@ -9,10 +9,6 @@ description: |- {{ .Description | trimspace }} -## Example Usage - -{{ tffile (printf "%s%s%s" "examples/resources/" .Name "/resource.tf") }} - {{ .SchemaMarkdown | trimspace }} {{ if .HasImport -}} From d80a5b990c6901deb45a3d026473d85b4c347c56 Mon Sep 17 00:00:00 2001 From: Luke Browning Date: Sat, 29 Jul 2023 02:18:01 -0700 Subject: [PATCH 2/2] Generate new data-source docs --- docs/data-sources/interfaces_vlan.md | 21 ----------- docs/data-sources/route.md | 19 ---------- docs/data-sources/unbound_domain_override.md | 21 ----------- docs/data-sources/unbound_forward.md | 22 ------------ docs/data-sources/unbound_host_alias.md | 33 ----------------- docs/data-sources/unbound_host_override.md | 37 -------------------- 6 files changed, 153 deletions(-) diff --git a/docs/data-sources/interfaces_vlan.md b/docs/data-sources/interfaces_vlan.md index 33927b2..860f77f 100644 --- a/docs/data-sources/interfaces_vlan.md +++ b/docs/data-sources/interfaces_vlan.md @@ -9,27 +9,6 @@ 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 diff --git a/docs/data-sources/route.md b/docs/data-sources/route.md index 6d38255..08cb0d9 100644 --- a/docs/data-sources/route.md +++ b/docs/data-sources/route.md @@ -9,25 +9,6 @@ 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 diff --git a/docs/data-sources/unbound_domain_override.md b/docs/data-sources/unbound_domain_override.md index f0bcf74..04e66ce 100644 --- a/docs/data-sources/unbound_domain_override.md +++ b/docs/data-sources/unbound_domain_override.md @@ -9,27 +9,6 @@ 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 diff --git a/docs/data-sources/unbound_forward.md b/docs/data-sources/unbound_forward.md index 8bd7339..aeb22e4 100644 --- a/docs/data-sources/unbound_forward.md +++ b/docs/data-sources/unbound_forward.md @@ -9,28 +9,6 @@ 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 diff --git a/docs/data-sources/unbound_host_alias.md b/docs/data-sources/unbound_host_alias.md index 98c26eb..377bf0e 100644 --- a/docs/data-sources/unbound_host_alias.md +++ b/docs/data-sources/unbound_host_alias.md @@ -9,39 +9,6 @@ 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 diff --git a/docs/data-sources/unbound_host_override.md b/docs/data-sources/unbound_host_override.md index 1cc83ea..51ef75f 100644 --- a/docs/data-sources/unbound_host_override.md +++ b/docs/data-sources/unbound_host_override.md @@ -9,43 +9,6 @@ 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