-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add bgp route redistribution object (#222)
- Loading branch information
Showing
18 changed files
with
1,022 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "nxos_bgp_route_redistribution Data Source - terraform-provider-nxos" | ||
subcategory: "BGP" | ||
description: |- | ||
This data source can read the BGP (VRF) route redistribution configuration. | ||
API Documentation: bgpInterLeakP https://pubhub.devnetcloud.com/media/dme-docs-10-2-2/docs/Routing%20and%20Forwarding/bgp:InterLeakP/ | ||
--- | ||
|
||
# nxos_bgp_route_redistribution (Data Source) | ||
|
||
This data source can read the BGP (VRF) route redistribution configuration. | ||
|
||
- API Documentation: [bgpInterLeakP](https://pubhub.devnetcloud.com/media/dme-docs-10-2-2/docs/Routing%20and%20Forwarding/bgp:InterLeakP/) | ||
|
||
## Example Usage | ||
|
||
```terraform | ||
data "nxos_bgp_route_redistribution" "example" { | ||
asn = "65001" | ||
vrf = "default" | ||
address_family = "ipv4-ucast" | ||
protocol = "ospf" | ||
protocol_instance = "OSPF1" | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `address_family` (String) Address Family. | ||
- `asn` (String) Autonomous system number. | ||
- `protocol` (String) The list of protocols to match. | ||
- `protocol_instance` (String) The inter protocol route leak policy instance (Use `none` for `static` and `direct` protocols). | ||
- `vrf` (String) VRF name. | ||
|
||
### Optional | ||
|
||
- `device` (String) A device name from the provider configuration. | ||
|
||
### Read-Only | ||
|
||
- `id` (String) The distinguished name of the object. | ||
- `route_map` (String) The name of the default route leak policy route map. This route map name is used to control distribution. | ||
- `scope` (String) The domain applicable to the capability. | ||
- `srv6_prefix_type` (String) SRv6 Prefix Type; Valid only when proto is srv6. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "nxos_bgp_route_redistribution Resource - terraform-provider-nxos" | ||
subcategory: "BGP" | ||
description: |- | ||
This resource can manage the BGP (VRF) route redistribution configuration. | ||
API Documentation: bgpInterLeakP https://pubhub.devnetcloud.com/media/dme-docs-10-2-2/docs/Routing%20and%20Forwarding/bgp:InterLeakP/ | ||
Parent resources | ||
nxosbgpaddress_family https://registry.terraform.io/providers/CiscoDevNet/nxos/latest/docs/resources/bgp_address_family | ||
--- | ||
|
||
# nxos_bgp_route_redistribution (Resource) | ||
|
||
This resource can manage the BGP (VRF) route redistribution configuration. | ||
|
||
- API Documentation: [bgpInterLeakP](https://pubhub.devnetcloud.com/media/dme-docs-10-2-2/docs/Routing%20and%20Forwarding/bgp:InterLeakP/) | ||
|
||
### Parent resources | ||
|
||
- [nxos_bgp_address_family](https://registry.terraform.io/providers/CiscoDevNet/nxos/latest/docs/resources/bgp_address_family) | ||
|
||
## Example Usage | ||
|
||
```terraform | ||
resource "nxos_bgp_route_redistribution" "example" { | ||
asn = "65001" | ||
vrf = "default" | ||
address_family = "ipv4-ucast" | ||
protocol = "ospf" | ||
protocol_instance = "OSPF1" | ||
route_map = "route_map_ospf_1" | ||
scope = "inter" | ||
srv6_prefix_type = "unspecified" | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `address_family` (String) Address Family. | ||
- Choices: `ipv4-ucast`, `ipv4-mcast`, `vpnv4-ucast`, `ipv6-ucast`, `ipv6-mcast`, `vpnv6-ucast`, `vpnv6-mcast`, `l2vpn-evpn`, `ipv4-lucast`, `ipv6-lucast`, `lnkstate`, `ipv4-mvpn`, `ipv6-mvpn`, `l2vpn-vpls`, `ipv4-mdt` | ||
- Default value: `ipv4-ucast` | ||
- `asn` (String) Autonomous system number. | ||
- `protocol` (String) The list of protocols to match. | ||
- Choices: `unspecified`, `static`, `direct`, `bgp`, `isis`, `ospf`, `ospfv3`, `eigrp`, `host`, `rip`, `amt`, `lisp`, `hmm`, `am`, `srv6` | ||
- Default value: `unspecified` | ||
- `protocol_instance` (String) The inter protocol route leak policy instance (Use `none` for `static` and `direct` protocols). | ||
- Default value: `none` | ||
- `vrf` (String) VRF name. | ||
|
||
### Optional | ||
|
||
- `device` (String) A device name from the provider configuration. | ||
- `route_map` (String) The name of the default route leak policy route map. This route map name is used to control distribution. | ||
- `scope` (String) The domain applicable to the capability. | ||
- Choices: `intra`, `inter`, `defrt` | ||
- Default value: `inter` | ||
- `srv6_prefix_type` (String) SRv6 Prefix Type; Valid only when proto is srv6. | ||
- Choices: `unspecified`, `locator` | ||
- Default value: `unspecified` | ||
|
||
### Read-Only | ||
|
||
- `id` (String) The distinguished name of the object. | ||
|
||
## Import | ||
|
||
Import is supported using the following syntax: | ||
|
||
```shell | ||
terraform import nxos_bgp_route_redistribution.example "sys/bgp/inst/dom-[default]/af-[ipv4-ucast]/interleak-[ospf]-interleak-[OSPF1]" | ||
``` |
7 changes: 7 additions & 0 deletions
7
examples/data-sources/nxos_bgp_route_redistribution/data-source.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
data "nxos_bgp_route_redistribution" "example" { | ||
asn = "65001" | ||
vrf = "default" | ||
address_family = "ipv4-ucast" | ||
protocol = "ospf" | ||
protocol_instance = "OSPF1" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
terraform import nxos_bgp_route_redistribution.example "sys/bgp/inst/dom-[default]/af-[ipv4-ucast]/interleak-[ospf]-interleak-[OSPF1]" |
10 changes: 10 additions & 0 deletions
10
examples/resources/nxos_bgp_route_redistribution/resource.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
resource "nxos_bgp_route_redistribution" "example" { | ||
asn = "65001" | ||
vrf = "default" | ||
address_family = "ipv4-ucast" | ||
protocol = "ospf" | ||
protocol_instance = "OSPF1" | ||
route_map = "route_map_ospf_1" | ||
scope = "inter" | ||
srv6_prefix_type = "unspecified" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,134 @@ | ||
--- | ||
name: BGP Route Redistribution | ||
class_name: bgpInterLeakP | ||
dn: sys/bgp/inst/dom-[%s]/af-[%s]/interleak-[%s]-interleak-[%s] | ||
ds_description: This data source can read the BGP (VRF) route redistribution configuration. | ||
res_description: This resource can manage the BGP (VRF) route redistribution configuration. | ||
doc_path: Routing%20and%20Forwarding/bgp:InterLeakP/ | ||
doc_category: BGP | ||
parents: | ||
- BGP Address Family | ||
attributes: | ||
- nxos_name: asn | ||
tf_name: asn | ||
type: String | ||
reference_only: true | ||
description: 'Autonomous system number.' | ||
example: '65001' | ||
- nxos_name: name | ||
tf_name: vrf | ||
type: String | ||
id: true | ||
reference_only: true | ||
description: 'VRF name.' | ||
example: default | ||
- nxos_name: type | ||
tf_name: address_family | ||
type: String | ||
id: true | ||
reference_only: true | ||
description: 'Address Family.' | ||
enum_values: | ||
- ipv4-ucast | ||
- ipv4-mcast | ||
- vpnv4-ucast | ||
- ipv6-ucast | ||
- ipv6-mcast | ||
- vpnv6-ucast | ||
- vpnv6-mcast | ||
- l2vpn-evpn | ||
- ipv4-lucast | ||
- ipv6-lucast | ||
- lnkstate | ||
- ipv4-mvpn | ||
- ipv6-mvpn | ||
- l2vpn-vpls | ||
- ipv4-mdt | ||
default_value: 'ipv4-ucast' | ||
example: 'ipv4-ucast' | ||
- nxos_name: proto | ||
tf_name: protocol | ||
type: String | ||
id: true | ||
description: 'The list of protocols to match.' | ||
enum_values: | ||
- unspecified | ||
- static | ||
- direct | ||
- bgp | ||
- isis | ||
- ospf | ||
- ospfv3 | ||
- eigrp | ||
- host | ||
- rip | ||
- amt | ||
- lisp | ||
- hmm | ||
- am | ||
- srv6 | ||
default_value: 'unspecified' | ||
example: 'ospf' | ||
- nxos_name: inst | ||
tf_name: protocol_instance | ||
type: String | ||
id: true | ||
description: 'The inter protocol route leak policy instance (Use `none` for `static` and `direct` protocols).' | ||
default_value: 'none' | ||
example: 'OSPF1' | ||
- nxos_name: rtMap | ||
tf_name: route_map | ||
type: String | ||
description: 'The name of the default route leak policy route map. This route map name is used to control distribution.' | ||
example: 'route_map_ospf_1' | ||
- nxos_name: scope | ||
tf_name: scope | ||
type: String | ||
description: 'The domain applicable to the capability.' | ||
enum_values: | ||
- intra | ||
- inter | ||
- defrt | ||
default_value: 'inter' | ||
example: 'inter' | ||
omit_empty_value: true | ||
- nxos_name: srv6PrefixType | ||
tf_name: srv6_prefix_type | ||
type: String | ||
description: 'SRv6 Prefix Type; Valid only when proto is srv6.' | ||
enum_values: | ||
- unspecified | ||
- locator | ||
default_value: 'unspecified' | ||
example: 'unspecified' | ||
omit_empty_value: true | ||
test_prerequisites: | ||
- dn: sys/fm/bgp | ||
class_name: fmBgp | ||
no_delete: true | ||
attributes: | ||
- name: adminSt | ||
value: enabled | ||
- dn: sys/bgp | ||
class_name: bgpEntity | ||
dependencies: [0] | ||
- dn: sys/bgp/inst | ||
class_name: bgpInst | ||
attributes: | ||
- name: adminSt | ||
value: enabled | ||
- name: asn | ||
value: '65001' | ||
dependencies: [1] | ||
- dn: sys/bgp/inst/dom-[default] | ||
class_name: bgpDom | ||
attributes: | ||
- name: name | ||
value: default | ||
dependencies: [2] | ||
- dn: sys/bgp/inst/dom-[default]/af-[ipv4-ucast] | ||
class_name: bgpDomAf | ||
attributes: | ||
- name: type | ||
value: ipv4-ucast | ||
dependencies: [3] |
Oops, something went wrong.