Fix up docs examples

This commit is contained in:
James Toyer
2021-02-18 21:54:58 +00:00
committed by Paul Tyng
parent 097aa6c225
commit d98513abe9
2 changed files with 56 additions and 0 deletions

View File

@@ -0,0 +1,32 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "unifi_port_profile Data Source - terraform-provider-unifi"
subcategory: ""
description: |-
unifi_port_profile data source can be used to retrieve the ID for a port profile by name.
---
# Data Source `unifi_port_profile`
`unifi_port_profile` data source can be used to retrieve the ID for a port profile by name.
## Example Usage
```terraform
data "unifi_port_profile" "all" {
}
```
<!-- schema generated by tfplugindocs -->
## Schema
### Optional
- **name** (String) The name of the port profile to look up. Defaults to `All`.
- **site** (String) The name of the site the port profile is associated with.
### Read-only
- **id** (String) The ID of this port profile.

View File

@@ -10,7 +10,31 @@ description: |-
`unifi_port_profile` manages a port profile for use on network switches.
## Example Usage
```terraform
variable "vlan_id" {
default = 10
}
resource "unifi_network" "vlan" {
name = "wifi-vlan"
purpose = "corporate"
subnet = "10.0.0.1/24"
vlan_id = var.vlan_id
dhcp_start = "10.0.0.6"
dhcp_stop = "10.0.0.254"
dhcp_enabled = true
}
resource "unifi_port_profile" "poe_disabled" {
name = "POE Disabled"
native_networkconf_id = unifi_network.vlan.id
poe_mode = "off"
}
```
<!-- schema generated by tfplugindocs -->
## Schema