Add unifi_static_route

Fixes #42
This commit is contained in:
Paul Tyng
2021-03-27 16:56:33 -04:00
parent 118f612b49
commit 8c315dc5ce
6 changed files with 424 additions and 1 deletions

View File

@@ -0,0 +1,60 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "unifi_static_route Resource - terraform-provider-unifi"
subcategory: ""
description: |-
unifi_static_route manages a static route.
---
# unifi_static_route (Resource)
`unifi_static_route` manages a static route.
## Example Usage
```terraform
resource "unifi_static_route" "nexthop" {
type = "nexthop-route"
network = "172.17.0.0/16"
name = "basic nexthop"
distance = 1
next_hop = "172.16.0.1"
}
resource "unifi_static_route" "blackhole" {
type = "blackhole"
network = var.blackhole_cidr
name = "blackhole traffice to cidr"
distance = 1
}
resource "unifi_static_route" "interface" {
type = "interface-route"
network = var.wan2_cidr
name = "send traffic over wan2"
distance = 1
interface = "WAN2"
}
```
<!-- schema generated by tfplugindocs -->
## Schema
### Required
- **distance** (Number) The distance of the static route.
- **name** (String) The name of the static route.
- **network** (String) The network subnet address.
- **type** (String) The type of static route. Can be `interface-route`, `nexthop-route`, or `blackhole`.
### Optional
- **interface** (String) The interface of the static route (only valid for `interface-route` type). This can be `WAN1`, `WAN2`, or a network ID.
- **next_hop** (String) The next hop of the static route (only valid for `nexthop-route` type).
- **site** (String) The name of the site to associate the static route with.
### Read-Only
- **id** (String) The ID of the static route.