Skip to content

Commit 1c5ea99

Browse files
authored
Add ipv4 vrf route-replicate support (#340)
1 parent bb30cf8 commit 1c5ea99

File tree

9 files changed

+260
-0
lines changed

9 files changed

+260
-0
lines changed

docs/data-sources/vrf.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ data "iosxe_vrf" "example" {
3535
- `address_family_ipv6` (Boolean) Address family
3636
- `description` (String) VRF specific description
3737
- `id` (String) The path of the retrieved object.
38+
- `ipv4_route_replicate` (Attributes List) (see [below for nested schema](#nestedatt--ipv4_route_replicate))
3839
- `ipv4_route_target_export` (Attributes Set) Export Target-VPN community (see [below for nested schema](#nestedatt--ipv4_route_target_export))
3940
- `ipv4_route_target_export_stitching` (Attributes Set) Export Target-VPN community (see [below for nested schema](#nestedatt--ipv4_route_target_export_stitching))
4041
- `ipv4_route_target_import` (Attributes Set) Import Target-VPN community (see [below for nested schema](#nestedatt--ipv4_route_target_import))
@@ -48,6 +49,16 @@ data "iosxe_vrf" "example" {
4849
- `route_target_import` (Attributes Set) Import Target-VPN community (see [below for nested schema](#nestedatt--route_target_import))
4950
- `vpn_id` (String) Configure VPN ID in rfc2685 format
5051

52+
<a id="nestedatt--ipv4_route_replicate"></a>
53+
### Nested Schema for `ipv4_route_replicate`
54+
55+
Read-Only:
56+
57+
- `name` (String) Source VRF name or 'global'
58+
- `route_map` (String) Route map reference
59+
- `unicast_all` (Boolean) All routes
60+
61+
5162
<a id="nestedatt--ipv4_route_target_export"></a>
5263
### Nested Schema for `ipv4_route_target_export`
5364

docs/resources/vrf.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,13 @@ resource "iosxe_vrf" "example" {
5252
value = "22:22"
5353
}
5454
]
55+
ipv4_route_replicate = [
56+
{
57+
name = "VRF1"
58+
unicast_all = true
59+
route_map = "RM1"
60+
}
61+
]
5562
ipv6_route_target_import = [
5663
{
5764
value = "22:22"
@@ -90,6 +97,7 @@ resource "iosxe_vrf" "example" {
9097
- Choices: `all`, `attributes`
9198
- `description` (String) VRF specific description
9299
- `device` (String) A device name from the provider configuration.
100+
- `ipv4_route_replicate` (Attributes List) (see [below for nested schema](#nestedatt--ipv4_route_replicate))
93101
- `ipv4_route_target_export` (Attributes Set) Export Target-VPN community (see [below for nested schema](#nestedatt--ipv4_route_target_export))
94102
- `ipv4_route_target_export_stitching` (Attributes Set) Export Target-VPN community (see [below for nested schema](#nestedatt--ipv4_route_target_export_stitching))
95103
- `ipv4_route_target_import` (Attributes Set) Import Target-VPN community (see [below for nested schema](#nestedatt--ipv4_route_target_import))
@@ -107,6 +115,19 @@ resource "iosxe_vrf" "example" {
107115

108116
- `id` (String) The path of the object.
109117

118+
<a id="nestedatt--ipv4_route_replicate"></a>
119+
### Nested Schema for `ipv4_route_replicate`
120+
121+
Required:
122+
123+
- `name` (String) Source VRF name or 'global'
124+
125+
Optional:
126+
127+
- `route_map` (String) Route map reference
128+
- `unicast_all` (Boolean) All routes
129+
130+
110131
<a id="nestedatt--ipv4_route_target_export"></a>
111132
### Nested Schema for `ipv4_route_target_export`
112133

examples/resources/iosxe_vrf/resource.tf

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,13 @@ resource "iosxe_vrf" "example" {
3737
value = "22:22"
3838
}
3939
]
40+
ipv4_route_replicate = [
41+
{
42+
name = "VRF1"
43+
unicast_all = true
44+
route_map = "RM1"
45+
}
46+
]
4047
ipv6_route_target_import = [
4148
{
4249
value = "22:22"

gen/definitions/vrf.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,21 @@ attributes:
8080
default_value: true
8181
exclude_test: true
8282
example: true
83+
- yang_name: address-family/ipv4/route-replicate/from/vrf
84+
tf_name: ipv4_route_replicate
85+
type: List
86+
attributes:
87+
- yang_name: name
88+
description: Source VRF name or 'global'
89+
example: VRF1
90+
id: true
91+
- yang_name: unicast/source-proto-config/all
92+
tf_name: unicast_all
93+
example: true
94+
- yang_name: unicast/source-proto-config/all/route-map
95+
tf_name: route_map
96+
description: Route map reference
97+
example: RM1
8398
- yang_name: address-family/ipv6/route-target/import-route-target/without-stitching
8499
tf_name: ipv6_route_target_import
85100
type: Set

internal/provider/data_source_iosxe_vrf.go

Lines changed: 20 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

internal/provider/data_source_iosxe_vrf_test.go

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

internal/provider/model_iosxe_vrf.go

Lines changed: 147 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

internal/provider/resource_iosxe_vrf.go

Lines changed: 23 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)