Skip to content

Commit f4d3cdc

Browse files
author
Jeremy Spencer
committed
feat: add inital BGP peer-template support
1 parent eebfc47 commit f4d3cdc

File tree

15 files changed

+1442
-7
lines changed

15 files changed

+1442
-7
lines changed

CHANGELOG.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
- Add `ip_ssh_bulk_mode` and `ip_ssh_bulk_mode_window_size` attributes to `iosxe_system` resource and data source
88
- Add `set_ip_next_hop_unchanged` attribute to `iosxe_route_map` resource and data source
99
- Enhance `set_communities` attribute documentation in `iosxe_route_map` to clarify support for well-known BGP community values (internet, local-AS, no-advertise, no-export, gshut)
10+
- Add `iosxe_bgp_template_peer_policy` resource
1011

1112
## 0.9.3
1213

@@ -21,7 +22,7 @@
2122
- Add `passive_interface_disable_*` attributes to `iosxe_ospf` and `iosxe_ospf_vrf` resources and data sources
2223
- Fix issue with destroying `iosxe_interface_ethernet` resources
2324
- Change route target attributes of `iosxe_vrf` from type "List" to "Set"
24-
- Add `role_based_enforcement` attributes to `iosxe_cts`
25+
- Add `role_based_enforcement` attributes to `iosxe_cts`
2526
- Add `tftp_source_interface_*` attributes to `iosxe_system` resource and data source
2627
- Add `hash` attribute to `iosxe_crypto_pki` resource and data source
2728
- Add `snooping_information_option`, `snooping_information_option_allow_untrusted` and `snooping_information_option_format_remote_id_string` attributes to `iosxe_dhcp` resource and data source
@@ -66,7 +67,7 @@
6667
- Add `level`, `list_name`, `action_type`, `broadcast`, `group_broadcast`, `group_logger`, `group1_group`, `group2_group`, `group3_group`, `group4_group`, `name`, `default`, `none`, `start_stop_broadcast`, `start_stop_logger`, `start_stop_group1`, `start_stop_group2`, `start_stop_group3`, `start_stop_group4`, `stop_only_broadcast`, `stop_only_logger`, `stop_only_group1`, `stop_only_group2`, `stop_only_group3`, `stop_only_group4`, `wait_start_broadcast`, `wait_start_logger`, `wait_start_group1`, `wait_start_group2`, `wait_start_group3`, `wait_start_group4`, `name`, `none`, `start_stop_broadcast`, `start_stop_logger`, `start_stop_group1`, `start_stop_group2`, `start_stop_group3`, `start_stop_group4`, `stop_only_broadcast`, `stop_only_logger`, `stop_only_group1`, `stop_only_group2`, `stop_only_group3`, `stop_only_group4`, `wait_start_broadcast`, `wait_start_logger`, `wait_start_group1`, `wait_start_group2`, `wait_start_group3`, and `wait_start_group4` attributes to `iosxe_aaa_accounting` resource and data source
6768
- Add `enable_default_group1_cache`, `enable_default_group1_enable`, `enable_default_group1_group`, `enable_default_group1_line`, `enable_default_group1_none`, `enable_default_group2_cache`, `enable_default_group2_enable`, `enable_default_group2_group`, `enable_default_group2_line`, `enable_default_group2_none`, `enable_default_group3_cache`, `enable_default_group3_enable`, `enable_default_group3_group`, `enable_default_group3_line`, `enable_default_group3_none`, `enable_default_group4_cache`, `enable_default_group4_enable`, `enable_default_group4_group`, `enable_default_group4_line`, and `enable_default_group4_none` attributes to `iosxe_aaa_authentication` resource and data source
6869
- Add `level`, `list_name`, `a1_group`, `a1_local`, `a1_if_authenticated`, `a1_none`, `a1_radius`, `a1_tacacs`, `a2_group`, `a2_local`, `a2_if_authenticated`, `a2_none`, `a2_radius`, `a2_tacacs`, `a3_group`, `a3_local`, `a3_if_authenticated`, `a3_none`, `a3_radius`, `a3_tacacs`, `a4_group`, `a4_local`, `a4_if_authenticated`, `a4_none`, `a4_radius`, `a4_tacacs`, `name`, `group1_cache`, `group1_group`, `group1_radius`, and `group1_tacacs` attributes to `iosxe_aaa_authorization` resource and data source
69-
- Add `vrf`, `local_authentication_type`, `local_authorization`, and `local_auth_max_fail_attempts` attributes to `iosxe_aaa` resrouce and data source
70+
- Add `vrf`, `local_authentication_type`, `local_authorization`, and `local_auth_max_fail_attempts` attributes to `iosxe_aaa` resrouce and data source
7071
- Add `icmp_named_msg_type`, `destination_port_equal_2`, `destination_port_equal_3`, `destination_port_equal_4`, `destination_port_equal_5`, `destination_port_equal_6`, `destination_port_equal_7`, `destination_port_equal_8`, `destination_port_equal_9`, `destination_port_equal_10`, `icmp_msg_type`, and `icmp_msg_code` attributes to `iosxe_access_list_extended` resource and data source
7172
- Add `iosxe_access_list_role_based` resource and data source
7273
- Add `filter_lists_cdp` attribute to `iosxe_device_sensor` resource and data source
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
---
2+
# generated by https://github.com/hashicorp/terraform-plugin-docs
3+
page_title: "iosxe_bgp_template_peer_policy Data Source - terraform-provider-iosxe"
4+
subcategory: "BGP"
5+
description: |-
6+
This data source can read the BGP Template Peer Policy configuration.
7+
---
8+
9+
# iosxe_bgp_template_peer_policy (Data Source)
10+
11+
This data source can read the BGP Template Peer Policy configuration.
12+
13+
## Example Usage
14+
15+
```terraform
16+
data "iosxe_bgp_template_peer_policy" "example" {
17+
asn = "65000"
18+
name = "PEERPOLICY_1"
19+
}
20+
```
21+
22+
<!-- schema generated by tfplugindocs -->
23+
## Schema
24+
25+
### Required
26+
27+
- `asn` (String)
28+
- `name` (String)
29+
30+
### Optional
31+
32+
- `device` (String) A device name from the provider configuration.
33+
34+
### Read-Only
35+
36+
- `allowas_in_as_number` (Number)
37+
- `as_override_split_horizon` (Boolean)
38+
- `id` (String) The path of the retrieved object.
39+
- `route_maps` (Attributes List) Apply route map to neighbor (see [below for nested schema](#nestedatt--route_maps))
40+
- `route_reflector_client` (Boolean) Configure a neighbor as Route Reflector client
41+
- `send_community` (String)
42+
43+
<a id="nestedatt--route_maps"></a>
44+
### Nested Schema for `route_maps`
45+
46+
Read-Only:
47+
48+
- `in_out` (String)
49+
- `route_map_name` (String)

docs/guides/changelog.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ description: |-
1616
- Add `ip_ssh_bulk_mode` and `ip_ssh_bulk_mode_window_size` attributes to `iosxe_system` resource and data source
1717
- Add `set_ip_next_hop_unchanged` attribute to `iosxe_route_map` resource and data source
1818
- Enhance `set_communities` attribute documentation in `iosxe_route_map` to clarify support for well-known BGP community values (internet, local-AS, no-advertise, no-export, gshut)
19+
- Add `iosxe_bgp_template_peer_policy` resource
1920

2021
## 0.9.3
2122

@@ -30,7 +31,7 @@ description: |-
3031
- Add `passive_interface_disable_*` attributes to `iosxe_ospf` and `iosxe_ospf_vrf` resources and data sources
3132
- Fix issue with destroying `iosxe_interface_ethernet` resources
3233
- Change route target attributes of `iosxe_vrf` from type "List" to "Set"
33-
- Add `role_based_enforcement` attributes to `iosxe_cts`
34+
- Add `role_based_enforcement` attributes to `iosxe_cts`
3435
- Add `tftp_source_interface_*` attributes to `iosxe_system` resource and data source
3536
- Add `hash` attribute to `iosxe_crypto_pki` resource and data source
3637
- Add `snooping_information_option`, `snooping_information_option_allow_untrusted` and `snooping_information_option_format_remote_id_string` attributes to `iosxe_dhcp` resource and data source
@@ -75,7 +76,7 @@ description: |-
7576
- Add `level`, `list_name`, `action_type`, `broadcast`, `group_broadcast`, `group_logger`, `group1_group`, `group2_group`, `group3_group`, `group4_group`, `name`, `default`, `none`, `start_stop_broadcast`, `start_stop_logger`, `start_stop_group1`, `start_stop_group2`, `start_stop_group3`, `start_stop_group4`, `stop_only_broadcast`, `stop_only_logger`, `stop_only_group1`, `stop_only_group2`, `stop_only_group3`, `stop_only_group4`, `wait_start_broadcast`, `wait_start_logger`, `wait_start_group1`, `wait_start_group2`, `wait_start_group3`, `wait_start_group4`, `name`, `none`, `start_stop_broadcast`, `start_stop_logger`, `start_stop_group1`, `start_stop_group2`, `start_stop_group3`, `start_stop_group4`, `stop_only_broadcast`, `stop_only_logger`, `stop_only_group1`, `stop_only_group2`, `stop_only_group3`, `stop_only_group4`, `wait_start_broadcast`, `wait_start_logger`, `wait_start_group1`, `wait_start_group2`, `wait_start_group3`, and `wait_start_group4` attributes to `iosxe_aaa_accounting` resource and data source
7677
- Add `enable_default_group1_cache`, `enable_default_group1_enable`, `enable_default_group1_group`, `enable_default_group1_line`, `enable_default_group1_none`, `enable_default_group2_cache`, `enable_default_group2_enable`, `enable_default_group2_group`, `enable_default_group2_line`, `enable_default_group2_none`, `enable_default_group3_cache`, `enable_default_group3_enable`, `enable_default_group3_group`, `enable_default_group3_line`, `enable_default_group3_none`, `enable_default_group4_cache`, `enable_default_group4_enable`, `enable_default_group4_group`, `enable_default_group4_line`, and `enable_default_group4_none` attributes to `iosxe_aaa_authentication` resource and data source
7778
- Add `level`, `list_name`, `a1_group`, `a1_local`, `a1_if_authenticated`, `a1_none`, `a1_radius`, `a1_tacacs`, `a2_group`, `a2_local`, `a2_if_authenticated`, `a2_none`, `a2_radius`, `a2_tacacs`, `a3_group`, `a3_local`, `a3_if_authenticated`, `a3_none`, `a3_radius`, `a3_tacacs`, `a4_group`, `a4_local`, `a4_if_authenticated`, `a4_none`, `a4_radius`, `a4_tacacs`, `name`, `group1_cache`, `group1_group`, `group1_radius`, and `group1_tacacs` attributes to `iosxe_aaa_authorization` resource and data source
78-
- Add `vrf`, `local_authentication_type`, `local_authorization`, and `local_auth_max_fail_attempts` attributes to `iosxe_aaa` resrouce and data source
79+
- Add `vrf`, `local_authentication_type`, `local_authorization`, and `local_auth_max_fail_attempts` attributes to `iosxe_aaa` resrouce and data source
7980
- Add `icmp_named_msg_type`, `destination_port_equal_2`, `destination_port_equal_3`, `destination_port_equal_4`, `destination_port_equal_5`, `destination_port_equal_6`, `destination_port_equal_7`, `destination_port_equal_8`, `destination_port_equal_9`, `destination_port_equal_10`, `icmp_msg_type`, and `icmp_msg_code` attributes to `iosxe_access_list_extended` resource and data source
8081
- Add `iosxe_access_list_role_based` resource and data source
8182
- Add `filter_lists_cdp` attribute to `iosxe_device_sensor` resource and data source
@@ -351,4 +352,3 @@ description: |-
351352
## 0.1.0
352353

353354
- Initial release
354-
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
---
2+
# generated by https://github.com/hashicorp/terraform-plugin-docs
3+
page_title: "iosxe_bgp_template_peer_policy Resource - terraform-provider-iosxe"
4+
subcategory: "BGP"
5+
description: |-
6+
This resource can manage the BGP Template Peer Policy configuration.
7+
---
8+
9+
# iosxe_bgp_template_peer_policy (Resource)
10+
11+
This resource can manage the BGP Template Peer Policy configuration.
12+
13+
## Example Usage
14+
15+
```terraform
16+
resource "iosxe_bgp_template_peer_policy" "example" {
17+
asn = "65000"
18+
name = "PEERPOLICY_1"
19+
route_reflector_client = true
20+
send_community = "both"
21+
route_maps = [
22+
{
23+
in_out = "in"
24+
route_map_name = "ROUTEMAP_1"
25+
}
26+
]
27+
allowas_in_as_number = 2
28+
as_override_split_horizon = true
29+
}
30+
```
31+
32+
<!-- schema generated by tfplugindocs -->
33+
## Schema
34+
35+
### Required
36+
37+
- `asn` (String)
38+
- `name` (String)
39+
40+
### Optional
41+
42+
- `allowas_in_as_number` (Number) - Range: `1`-`10`
43+
- `as_override_split_horizon` (Boolean)
44+
- `delete_mode` (String) Configure behavior when deleting/destroying the resource. Either delete the entire object (YANG container) being managed, or only delete the individual resource attributes configured explicitly and leave everything else as-is. Default value is `all`.
45+
- Choices: `all`, `attributes`
46+
- `device` (String) A device name from the provider configuration.
47+
- `route_maps` (Attributes List) Apply route map to neighbor (see [below for nested schema](#nestedatt--route_maps))
48+
- `route_reflector_client` (Boolean) Configure a neighbor as Route Reflector client
49+
- `send_community` (String) - Choices: `both`, `extended`, `standard`
50+
51+
### Read-Only
52+
53+
- `id` (String) The path of the object.
54+
55+
<a id="nestedatt--route_maps"></a>
56+
### Nested Schema for `route_maps`
57+
58+
Required:
59+
60+
- `in_out` (String) - Choices: `in`, `out`
61+
- `route_map_name` (String)
62+
63+
## Import
64+
65+
Import is supported using the following syntax:
66+
67+
The [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import) can be used, for example:
68+
69+
```shell
70+
terraform import iosxe_bgp_template_peer_policy.example "<asn>,<name>"
71+
```
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
data "iosxe_bgp_template_peer_policy" "example" {
2+
asn = "65000"
3+
name = "PEERPOLICY_1"
4+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
terraform import iosxe_bgp_template_peer_policy.example "<asn>,<name>"
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
resource "iosxe_bgp_template_peer_policy" "example" {
2+
asn = "65000"
3+
name = "PEERPOLICY_1"
4+
route_reflector_client = true
5+
send_community = "both"
6+
route_maps = [
7+
{
8+
in_out = "in"
9+
route_map_name = "ROUTEMAP_1"
10+
}
11+
]
12+
allowas_in_as_number = 2
13+
as_override_split_horizon = true
14+
}
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
name: BGP Template Peer Policy
3+
path: Cisco-IOS-XE-native:native/router/Cisco-IOS-XE-bgp:bgp=%v/template/peer-policy=%v
4+
doc_category: BGP
5+
attributes:
6+
- yang_name: id
7+
yang_scope: bgp
8+
tf_name: asn
9+
example: 65000
10+
- yang_name: name
11+
yang_scope: peer-policy
12+
example: PEERPOLICY_1
13+
- yang_name: route-reflector-client
14+
example: true
15+
- yang_name: send-community/send-community-where
16+
tf_name: send_community
17+
example: both
18+
- yang_name: route-map1
19+
type: List
20+
tf_name: route_maps
21+
attributes:
22+
- yang_name: inout
23+
tf_name: in_out
24+
id: true
25+
example: in
26+
- yang_name: route-map-name
27+
example: ROUTEMAP_1
28+
- yang_name: allowas-in/as-number
29+
tf_name: allowas_in_as_number
30+
example: 2
31+
- yang_name: as-override/split-horizon
32+
tf_name: as_override_split_horizon
33+
example: true
34+
test_prerequisites:
35+
- path: Cisco-IOS-XE-native:native/router/Cisco-IOS-XE-bgp:bgp=65000
36+
attributes:
37+
- name: id
38+
value: 65000
39+
- path: Cisco-IOS-XE-native:native/route-map=ROUTEMAP_1
40+
attributes:
41+
- name: name
42+
value: ROUTEMAP_1

0 commit comments

Comments
 (0)