Skip to content

Commit be06542

Browse files
authored
New route map for tags (#289)
1 parent a037c92 commit be06542

14 files changed

+769
-0
lines changed
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
---
2+
# generated by https://github.com/hashicorp/terraform-plugin-docs
3+
page_title: "nxos_route_map_rule_entry_match_tag Data Source - terraform-provider-nxos"
4+
subcategory: "Routing"
5+
description: |-
6+
This data source can read a Match Tag in Route-Map Rule Entry configuration.
7+
API Documentation: rtmapMatchRtTag https://pubhub.devnetcloud.com/media/dme-docs-10-2-2/docs/Routing%20and%20Forwarding/rtmap:MatchRtTag/
8+
---
9+
10+
# nxos_route_map_rule_entry_match_tag (Data Source)
11+
12+
This data source can read a Match Tag in Route-Map Rule Entry configuration.
13+
14+
- API Documentation: [rtmapMatchRtTag](https://pubhub.devnetcloud.com/media/dme-docs-10-2-2/docs/Routing%20and%20Forwarding/rtmap:MatchRtTag/)
15+
16+
## Example Usage
17+
18+
```terraform
19+
data "nxos_route_map_rule_entry_match_tag" "example" {
20+
rule_name = "RULE1"
21+
order = 10
22+
tag = 12345
23+
}
24+
```
25+
26+
<!-- schema generated by tfplugindocs -->
27+
## Schema
28+
29+
### Required
30+
31+
- `order` (Number) Route-Map Rule Entry order.
32+
- `rule_name` (String) Route Map rule name.
33+
- `tag` (Number) Route Map Tag Value
34+
35+
### Optional
36+
37+
- `device` (String) A device name from the provider configuration.
38+
39+
### Read-Only
40+
41+
- `id` (String) The distinguished name of the object.

docs/guides/supported_objects.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ For the following DME objects a corresponding Terraform resource and data source
124124
| [rtmapEntry](https://pubhub.devnetcloud.com/media/dme-docs-10-2-2/docs/Routing%20and%20Forwarding/rtmap:Entry/) | [nxos_route_map_rule_entry](https://registry.terraform.io/providers/CiscoDevNet/nxos/latest/docs/resources/route_map_rule_entry) | [nxos_route_map_rule_entry](https://registry.terraform.io/providers/CiscoDevNet/nxos/latest/docs/data-sources/route_map_rule_entry) |
125125
| [rtmapMatchRtDst](https://pubhub.devnetcloud.com/media/dme-docs-10-2-2/docs/Routing%20and%20Forwarding/rtmap:MatchRtDst/) | [nxos_route_map_rule_entry_match_route](https://registry.terraform.io/providers/CiscoDevNet/nxos/latest/docs/resources/route_map_rule_entry_match_route) | [nxos_route_map_rule_entry_match_route](https://registry.terraform.io/providers/CiscoDevNet/nxos/latest/docs/data-sources/route_map_rule_entry_match_route) |
126126
| [rtmapRsRtDstAtt](https://pubhub.devnetcloud.com/media/dme-docs-10-2-2/docs/Routing%20and%20Forwarding/rtmap:RsRtDstAtt/) | [nxos_route_map_rule_entry_match_route_prefix_list](https://registry.terraform.io/providers/CiscoDevNet/nxos/latest/docs/resources/route_map_rule_entry_match_route_prefix_list) | [nxos_route_map_rule_entry_match_route_prefix_list](https://registry.terraform.io/providers/CiscoDevNet/nxos/latest/docs/data-sources/route_map_rule_entry_match_route_prefix_list) |
127+
| [rtmapMatchRtTag](https://pubhub.devnetcloud.com/media/dme-docs-10-2-2/docs/Routing%20and%20Forwarding/rtmap:MatchRtTag/) | [nxos_route_map_rule_entry_match_tag](https://registry.terraform.io/providers/CiscoDevNet/nxos/latest/docs/resources/route_map_rule_entry_match_tag) | [nxos_route_map_rule_entry_match_tag](https://registry.terraform.io/providers/CiscoDevNet/nxos/latest/docs/data-sources/route_map_rule_entry_match_tag) |
127128
| [rtmapSetRegComm](https://pubhub.devnetcloud.com/media/dme-docs-10-2-2/docs/Routing%20and%20Forwarding/rtmap:SetRegComm/) | [nxos_route_map_rule_entry_set_regular_community](https://registry.terraform.io/providers/CiscoDevNet/nxos/latest/docs/resources/route_map_rule_entry_set_regular_community) | [nxos_route_map_rule_entry_set_regular_community](https://registry.terraform.io/providers/CiscoDevNet/nxos/latest/docs/data-sources/route_map_rule_entry_set_regular_community) |
128129
| [rtregcomItem](https://pubhub.devnetcloud.com/media/dme-docs-10-2-2/docs/Routing%20and%20Forwarding/rtregcom:Item/) | [nxos_route_map_rule_entry_set_regular_community_item](https://registry.terraform.io/providers/CiscoDevNet/nxos/latest/docs/resources/route_map_rule_entry_set_regular_community_item) | [nxos_route_map_rule_entry_set_regular_community_item](https://registry.terraform.io/providers/CiscoDevNet/nxos/latest/docs/data-sources/route_map_rule_entry_set_regular_community_item) |
129130
| [stpIf](https://pubhub.devnetcloud.com/media/dme-docs-10-2-2/docs/Discovery%20Protocols/stp:If/) | [nxos_spanning_tree_interface](https://registry.terraform.io/providers/CiscoDevNet/nxos/latest/docs/resources/spanning_tree_interface) | [nxos_spanning_tree_interface](https://registry.terraform.io/providers/CiscoDevNet/nxos/latest/docs/data-sources/spanning_tree_interface) |
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
---
2+
# generated by https://github.com/hashicorp/terraform-plugin-docs
3+
page_title: "nxos_route_map_rule_entry_match_tag Resource - terraform-provider-nxos"
4+
subcategory: "Routing"
5+
description: |-
6+
This resource can manage a Match Tag in Route-Map Rule Entry configuration.
7+
API Documentation: rtmapMatchRtTag https://pubhub.devnetcloud.com/media/dme-docs-10-2-2/docs/Routing%20and%20Forwarding/rtmap:MatchRtTag/
8+
Parent resources
9+
nxos_route_map_rule_entry https://registry.terraform.io/providers/CiscoDevNet/nxos/latest/docs/resources/route_map_rule_entry
10+
Child resources
11+
nxos_route_map_rule_entry_match_tag https://registry.terraform.io/providers/CiscoDevNet/nxos/latest/docs/resources/route_map_rule_entry_match_tag
12+
---
13+
14+
# nxos_route_map_rule_entry_match_tag (Resource)
15+
16+
This resource can manage a Match Tag in Route-Map Rule Entry configuration.
17+
18+
- API Documentation: [rtmapMatchRtTag](https://pubhub.devnetcloud.com/media/dme-docs-10-2-2/docs/Routing%20and%20Forwarding/rtmap:MatchRtTag/)
19+
20+
### Parent resources
21+
22+
- [nxos_route_map_rule_entry](https://registry.terraform.io/providers/CiscoDevNet/nxos/latest/docs/resources/route_map_rule_entry)
23+
24+
### Child resources
25+
26+
- [nxos_route_map_rule_entry_match_tag](https://registry.terraform.io/providers/CiscoDevNet/nxos/latest/docs/resources/route_map_rule_entry_match_tag)
27+
28+
## Example Usage
29+
30+
```terraform
31+
resource "nxos_route_map_rule_entry_match_tag" "example" {
32+
rule_name = "RULE1"
33+
order = 10
34+
tag = 12345
35+
}
36+
```
37+
38+
<!-- schema generated by tfplugindocs -->
39+
## Schema
40+
41+
### Required
42+
43+
- `order` (Number) Route-Map Rule Entry order.
44+
- Range: `0`-`65535`
45+
- `rule_name` (String) Route Map rule name.
46+
- `tag` (Number) Route Map Tag Value
47+
- Range: `0`-`4294967295`
48+
49+
### Optional
50+
51+
- `device` (String) A device name from the provider configuration.
52+
53+
### Read-Only
54+
55+
- `id` (String) The distinguished name of the object.
56+
57+
## Import
58+
59+
Import is supported using the following syntax:
60+
61+
```shell
62+
terraform import nxos_route_map_rule_entry_match_tag.example "sys/rpm/rtmap-[RULE1]/ent-[10]/mrttag-[12345]"
63+
```
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
data "nxos_route_map_rule_entry_match_tag" "example" {
2+
rule_name = "RULE1"
3+
order = 10
4+
tag = 12345
5+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
terraform import nxos_route_map_rule_entry_match_tag.example "sys/rpm/rtmap-[RULE1]/ent-[10]/mrttag-[12345]"
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
resource "nxos_route_map_rule_entry_match_tag" "example" {
2+
rule_name = "RULE1"
3+
order = 10
4+
tag = 12345
5+
}
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
---
2+
name: Route Map Rule Entry Match Tag
3+
class_name: rtmapMatchRtTag
4+
dn: sys/rpm/rtmap-[%s]/ent-[%v]/mrttag-[%v]
5+
ds_description: This data source can read a Match Tag in Route-Map Rule Entry configuration.
6+
res_description: This resource can manage a Match Tag in Route-Map Rule Entry configuration.
7+
doc_path: Routing%20and%20Forwarding/rtmap:MatchRtTag/
8+
doc_category: Routing
9+
parents:
10+
- Route Map Rule Entry
11+
children:
12+
- Route Map Rule Entry Match Tag
13+
attributes:
14+
- nxos_name: rtmap
15+
tf_name: rule_name
16+
type: String
17+
id: true
18+
reference_only: true
19+
description: "Route Map rule name."
20+
example: RULE1
21+
- nxos_name: order
22+
tf_name: order
23+
type: Int64
24+
description: "Route-Map Rule Entry order."
25+
min_int: 0
26+
max_int: 65535
27+
example: 10
28+
id: true
29+
reference_only: true
30+
- nxos_name: tag
31+
tf_name: tag
32+
type: Int64
33+
min_int: 0
34+
max_int: 4294967295
35+
description: "Route Map Tag Value"
36+
id: true
37+
example: 12345
38+
mandatory: true
39+
test_prerequisites:
40+
- dn: sys/rpm/rtmap-[RULE1]
41+
class_name: rtmapRule
42+
attributes:
43+
- name: name
44+
value: RULE1
45+
- dn: sys/rpm/rtmap-[RULE1]/ent-[10]
46+
class_name: rtmapEntry
47+
attributes:
48+
- name: order
49+
value: 10
50+
dependencies: [0]

internal/provider/data_source_nxos_route_map_rule_entry_match_tag.go

Lines changed: 116 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_nxos_route_map_rule_entry_match_tag_test.go

Lines changed: 78 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)