Skip to content

Commit

Permalink
Add interface docs
Browse files Browse the repository at this point in the history
  • Loading branch information
browningluke committed Oct 29, 2023
1 parent d33e0ec commit e16817d
Show file tree
Hide file tree
Showing 2 changed files with 77 additions and 0 deletions.
57 changes: 57 additions & 0 deletions docs/data-sources/interface.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
---
page_title: "opnsense_interface Data Source - terraform-provider-opnsense"
subcategory: Interfaces
description: |-
Interfaces can be used to get configurations of OPNsense interfaces.
---

# opnsense_interface (Data Source)

Interfaces can be used to get configurations of OPNsense interfaces.

<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `device` (String) Name of the interface device.

### Read-Only

- `capabilities` (Set of String) List of capabilities the interface supports.
- `flags` (Set of String) List of flags configured on the interface (equiv. to flags=xxxx in output of ifconfig).
- `groups` (Set of String) List of groups the interface is a member of.
- `ipv4` (Attributes List) (see [below for nested schema](#nestedatt--ipv4))
- `ipv6` (Attributes List) (see [below for nested schema](#nestedatt--ipv6))
- `is_physical` (Boolean) Whether the interface is physical or virtual.
- `macaddr` (String) MAC address assigned to the interface.
- `media` (String) Interface media type settings (see https://man.openbsd.org/ifmedia.4).
- `media_raw` (String) User-friendly interface media type.
- `mtu` (Number) Maximum Transmission Unit for the interface. This is typically 1500 bytes but can vary in some circumstances.
- `options` (Set of String) List of options configured on the interface (equiv. to options=xx in output of ifconfig).
- `status` (String) Status of the interface (e.g. `"active"`).
- `supported_media` (Set of String) List of supported media type settings (see https://man.openbsd.org/ifmedia.4).

<a id="nestedatt--ipv4"></a>
### Nested Schema for `ipv4`

Read-Only:

- `ipaddr` (String) IPv4 address assigned to the interface.
- `subnetbits` (Number) Number of subnet bits (i.e. CIDR).
- `tunnel` (Boolean) Whether IPv4 tunnelling is enabled.


<a id="nestedatt--ipv6"></a>
### Nested Schema for `ipv6`

Read-Only:

- `autoconf` (Boolean) Whether auto-configuration is enabled for the address.
- `deprecated` (Boolean) Whether the address is deprecated.
- `ipaddr` (String) IPv6 address assigned to the interface.
- `link_local` (Boolean) Whether the address is link-local.
- `subnetbits` (Number) Number of subnet bits (i.e. CIDR).
- `tentative` (Boolean) Whether the address is tentative.
- `tunnel` (Boolean) Whether IPv6 tunnelling is enabled.

20 changes: 20 additions & 0 deletions templates/data-sources/interface.md.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
page_title: "{{.Name}} {{.Type}} - {{.RenderedProviderName}}"
subcategory: Interfaces
description: |-
{{ .Description | plainmarkdown | trimspace | prefixlines " " }}
---

# {{.Name}} ({{.Type}})

{{ .Description | trimspace }}

{{ .SchemaMarkdown | trimspace }}

{{ if .HasImport -}}
## Import

Import is supported using the following syntax:

{{ printf "{{codefile \"shell\" %q}}" .ImportFile }}
{{- end }}

0 comments on commit e16817d

Please sign in to comment.