Skip to content

Commit 20cb4cf

Browse files
committed
Add vrf and bridge domain resources
1 parent 476df74 commit 20cb4cf

35 files changed

+1532
-1
lines changed

CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
1-
## 0.2.2 (unreleased)
1+
## 0.2.2
22

33
- Add nxos_ipv4_interface resource and data source
44
- Add nxos_ipv4_interface_address resource and data source
5+
- Add nxos_vrf resource and data source
6+
- Add nxos_vrf_container resource and data source
7+
- Add nxos_bridge_domain resource and data source
58

69
## 0.2.1
710

docs/data-sources/bridge_domain.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
# generated by https://github.com/hashicorp/terraform-plugin-docs
3+
page_title: "nxos_bridge_domain Data Source - terraform-provider-nxos"
4+
subcategory: ""
5+
description: |-
6+
This data source can read a bridge domain.
7+
---
8+
9+
# nxos_bridge_domain (Data Source)
10+
11+
This data source can read a bridge domain.
12+
13+
## Example Usage
14+
15+
```terraform
16+
data "nxos_bridge_domain" "example" {
17+
fabric_encap = "vlan-10"
18+
}
19+
```
20+
21+
<!-- schema generated by tfplugindocs -->
22+
## Schema
23+
24+
### Required
25+
26+
- **fabric_encap** (String) Fabric encapsulation. Possible values are `unknown`, `vlan-XX` or `vxlan-XX`.
27+
28+
### Read-Only
29+
30+
- **access_encap** (String) Access encapsulation. Possible values are `unknown`, `vlan-XX` or `vxlan-XX`.
31+
- **id** (String) The distinguished name of the object.
32+
- **name** (String) Bridge domain name.
33+
34+

docs/data-sources/vrf.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
# generated by https://github.com/hashicorp/terraform-plugin-docs
3+
page_title: "nxos_vrf Data Source - terraform-provider-nxos"
4+
subcategory: ""
5+
description: |-
6+
This data source can read a VRF.
7+
---
8+
9+
# nxos_vrf (Data Source)
10+
11+
This data source can read a VRF.
12+
13+
## Example Usage
14+
15+
```terraform
16+
data "nxos_vrf" "example" {
17+
name = "VRF1"
18+
}
19+
```
20+
21+
<!-- schema generated by tfplugindocs -->
22+
## Schema
23+
24+
### Required
25+
26+
- **name** (String) VRF name.
27+
28+
### Read-Only
29+
30+
- **description** (String) VRF description.
31+
- **id** (String) The distinguished name of the object.
32+
33+

docs/data-sources/vrf_container.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
# generated by https://github.com/hashicorp/terraform-plugin-docs
3+
page_title: "nxos_vrf_container Data Source - terraform-provider-nxos"
4+
subcategory: ""
5+
description: |-
6+
This data source can read a VRF container.
7+
---
8+
9+
# nxos_vrf_container (Data Source)
10+
11+
This data source can read a VRF container.
12+
13+
## Example Usage
14+
15+
```terraform
16+
data "nxos_vrf_container" "example" {
17+
name = "VRF1"
18+
}
19+
```
20+
21+
<!-- schema generated by tfplugindocs -->
22+
## Schema
23+
24+
### Required
25+
26+
- **name** (String) VRF name.
27+
28+
### Read-Only
29+
30+
- **id** (String) The distinguished name of the object.
31+
32+

docs/resources/bridge_domain.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
---
2+
# generated by https://github.com/hashicorp/terraform-plugin-docs
3+
page_title: "nxos_bridge_domain Resource - terraform-provider-nxos"
4+
subcategory: ""
5+
description: |-
6+
This resource can manage a bridge domain.
7+
API Documentation: ipv4If https://pubhub.devnetcloud.com/media/dme-docs-10-2-2/docs/System/l2:BD/
8+
---
9+
10+
# nxos_bridge_domain (Resource)
11+
12+
This resource can manage a bridge domain.
13+
14+
- API Documentation: [ipv4If](https://pubhub.devnetcloud.com/media/dme-docs-10-2-2/docs/System/l2:BD/)
15+
16+
## Example Usage
17+
18+
```terraform
19+
resource "nxos_bridge_domain" "example" {
20+
fabric_encap = "vlan-10"
21+
access_encap = "unknown"
22+
name = "VLAN10"
23+
}
24+
```
25+
26+
<!-- schema generated by tfplugindocs -->
27+
## Schema
28+
29+
### Required
30+
31+
- **fabric_encap** (String) Fabric encapsulation. Possible values are `unknown`, `vlan-XX` or `vxlan-XX`.
32+
- Default value: `unknown`
33+
34+
### Optional
35+
36+
- **access_encap** (String) Access encapsulation. Possible values are `unknown`, `vlan-XX` or `vxlan-XX`.
37+
- Default value: `unknown`
38+
- **name** (String) Bridge domain name.
39+
40+
### Read-Only
41+
42+
- **id** (String) The distinguished name of the object.
43+
44+
## Import
45+
46+
Import is supported using the following syntax:
47+
48+
```shell
49+
terraform import nxos_bridge_domain.example "sys/bd/bd-[vlan-10]"
50+
```

docs/resources/vrf.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
---
2+
# generated by https://github.com/hashicorp/terraform-plugin-docs
3+
page_title: "nxos_vrf Resource - terraform-provider-nxos"
4+
subcategory: ""
5+
description: |-
6+
This resource can manage a VRF.
7+
API Documentation: ipv4If https://pubhub.devnetcloud.com/media/dme-docs-10-2-2/docs/System/l3:Inst/
8+
---
9+
10+
# nxos_vrf (Resource)
11+
12+
This resource can manage a VRF.
13+
14+
- API Documentation: [ipv4If](https://pubhub.devnetcloud.com/media/dme-docs-10-2-2/docs/System/l3:Inst/)
15+
16+
## Example Usage
17+
18+
```terraform
19+
resource "nxos_vrf" "example" {
20+
name = "VRF1"
21+
description = "My VRF1 Description"
22+
}
23+
```
24+
25+
<!-- schema generated by tfplugindocs -->
26+
## Schema
27+
28+
### Required
29+
30+
- **name** (String) VRF name.
31+
32+
### Optional
33+
34+
- **description** (String) VRF description.
35+
36+
### Read-Only
37+
38+
- **id** (String) The distinguished name of the object.
39+
40+
## Import
41+
42+
Import is supported using the following syntax:
43+
44+
```shell
45+
terraform import nxos_vrf.example "sys/inst-[VRF1]"
46+
```

docs/resources/vrf_container.md

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_vrf_container Resource - terraform-provider-nxos"
4+
subcategory: ""
5+
description: |-
6+
This resource can manage a VRF container.
7+
API Documentation: ipv4If https://pubhub.devnetcloud.com/media/dme-docs-10-2-2/docs/System/l3:Inst/
8+
---
9+
10+
# nxos_vrf_container (Resource)
11+
12+
This resource can manage a VRF container.
13+
14+
- API Documentation: [ipv4If](https://pubhub.devnetcloud.com/media/dme-docs-10-2-2/docs/System/l3:Inst/)
15+
16+
## Example Usage
17+
18+
```terraform
19+
resource "nxos_vrf_container" "example" {
20+
name = "VRF1"
21+
}
22+
```
23+
24+
<!-- schema generated by tfplugindocs -->
25+
## Schema
26+
27+
### Required
28+
29+
- **name** (String) VRF name.
30+
31+
### Read-Only
32+
33+
- **id** (String) The distinguished name of the object.
34+
35+
## Import
36+
37+
Import is supported using the following syntax:
38+
39+
```shell
40+
terraform import nxos_vrf_container.example "sys/ipv4/inst/dom-[VRF1]"
41+
```
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
data "nxos_bridge_domain" "example" {
2+
fabric_encap = "vlan-10"
3+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
data "nxos_vrf" "example" {
2+
name = "VRF1"
3+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
data "nxos_vrf_container" "example" {
2+
name = "VRF1"
3+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
terraform import nxos_bridge_domain.example "sys/bd/bd-[vlan-10]"
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
resource "nxos_bridge_domain" "example" {
2+
fabric_encap = "vlan-10"
3+
access_encap = "unknown"
4+
name = "VLAN10"
5+
}

examples/resources/nxos_vrf/import.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
terraform import nxos_vrf.example "sys/inst-[VRF1]"
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
resource "nxos_vrf" "example" {
2+
name = "VRF1"
3+
description = "My VRF1 Description"
4+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
terraform import nxos_vrf_container.example "sys/ipv4/inst/dom-[VRF1]"
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
resource "nxos_vrf_container" "example" {
2+
name = "VRF1"
3+
}

gen/definitions/bridge_domain.yaml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
name: Bridge Domain
3+
class_name: l2BD
4+
dn: sys/bd/bd-[%s]
5+
ds_description: |-
6+
This data source can read a bridge domain.
7+
res_description: |-
8+
This resource can manage a bridge domain.\n\n- API Documentation: [ipv4If](https://pubhub.devnetcloud.com/media/dme-docs-10-2-2/docs/System/l2:BD/)
9+
attributes:
10+
- nxos_name: fabEncap
11+
tf_name: fabric_encap
12+
type: String
13+
id: true
14+
description: 'Fabric encapsulation. Possible values are `unknown`, `vlan-XX` or `vxlan-XX`.'
15+
default_value: unknown
16+
example: vlan-10
17+
- nxos_name: accEncap
18+
tf_name: access_encap
19+
type: String
20+
description: 'Access encapsulation. Possible values are `unknown`, `vlan-XX` or `vxlan-XX`.'
21+
default_value: unknown
22+
example: unknown
23+
- nxos_name: name
24+
tf_name: name
25+
type: String
26+
description: 'Bridge domain name.'
27+
example: VLAN10

gen/definitions/vrf.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: VRF
3+
class_name: l3Inst
4+
dn: sys/inst-[%s]
5+
ds_description: |-
6+
This data source can read a VRF.
7+
res_description: |-
8+
This resource can manage a VRF.\n\n- API Documentation: [ipv4If](https://pubhub.devnetcloud.com/media/dme-docs-10-2-2/docs/System/l3:Inst/)
9+
attributes:
10+
- nxos_name: name
11+
tf_name: name
12+
type: String
13+
id: true
14+
description: 'VRF name.'
15+
example: 'VRF1'
16+
- nxos_name: descr
17+
tf_name: description
18+
type: String
19+
description: 'VRF description.'
20+
example: My VRF1 Description

gen/definitions/vrf_container.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
name: VRF Container
3+
class_name: ipv4Dom
4+
dn: sys/ipv4/inst/dom-[%s]
5+
ds_description: |-
6+
This data source can read a VRF container.
7+
res_description: |-
8+
This resource can manage a VRF container.\n\n- API Documentation: [ipv4If](https://pubhub.devnetcloud.com/media/dme-docs-10-2-2/docs/System/l3:Inst/)
9+
attributes:
10+
- nxos_name: name
11+
tf_name: name
12+
type: String
13+
id: true
14+
description: 'VRF name.'
15+
example: 'VRF1'

0 commit comments

Comments
 (0)