Skip to content

Commit

Permalink
Add vrf and bridge domain resources
Browse files Browse the repository at this point in the history
  • Loading branch information
danischm committed Mar 21, 2022
1 parent 476df74 commit 20cb4cf
Show file tree
Hide file tree
Showing 35 changed files with 1,532 additions and 1 deletion.
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
## 0.2.2 (unreleased)
## 0.2.2

- Add nxos_ipv4_interface resource and data source
- Add nxos_ipv4_interface_address resource and data source
- Add nxos_vrf resource and data source
- Add nxos_vrf_container resource and data source
- Add nxos_bridge_domain resource and data source

## 0.2.1

Expand Down
34 changes: 34 additions & 0 deletions docs/data-sources/bridge_domain.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "nxos_bridge_domain Data Source - terraform-provider-nxos"
subcategory: ""
description: |-
This data source can read a bridge domain.
---

# nxos_bridge_domain (Data Source)

This data source can read a bridge domain.

## Example Usage

```terraform
data "nxos_bridge_domain" "example" {
fabric_encap = "vlan-10"
}
```

<!-- schema generated by tfplugindocs -->
## Schema

### Required

- **fabric_encap** (String) Fabric encapsulation. Possible values are `unknown`, `vlan-XX` or `vxlan-XX`.

### Read-Only

- **access_encap** (String) Access encapsulation. Possible values are `unknown`, `vlan-XX` or `vxlan-XX`.
- **id** (String) The distinguished name of the object.
- **name** (String) Bridge domain name.


33 changes: 33 additions & 0 deletions docs/data-sources/vrf.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "nxos_vrf Data Source - terraform-provider-nxos"
subcategory: ""
description: |-
This data source can read a VRF.
---

# nxos_vrf (Data Source)

This data source can read a VRF.

## Example Usage

```terraform
data "nxos_vrf" "example" {
name = "VRF1"
}
```

<!-- schema generated by tfplugindocs -->
## Schema

### Required

- **name** (String) VRF name.

### Read-Only

- **description** (String) VRF description.
- **id** (String) The distinguished name of the object.


32 changes: 32 additions & 0 deletions docs/data-sources/vrf_container.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "nxos_vrf_container Data Source - terraform-provider-nxos"
subcategory: ""
description: |-
This data source can read a VRF container.
---

# nxos_vrf_container (Data Source)

This data source can read a VRF container.

## Example Usage

```terraform
data "nxos_vrf_container" "example" {
name = "VRF1"
}
```

<!-- schema generated by tfplugindocs -->
## Schema

### Required

- **name** (String) VRF name.

### Read-Only

- **id** (String) The distinguished name of the object.


50 changes: 50 additions & 0 deletions docs/resources/bridge_domain.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "nxos_bridge_domain Resource - terraform-provider-nxos"
subcategory: ""
description: |-
This resource can manage a bridge domain.
API Documentation: ipv4If https://pubhub.devnetcloud.com/media/dme-docs-10-2-2/docs/System/l2:BD/
---

# nxos_bridge_domain (Resource)

This resource can manage a bridge domain.

- API Documentation: [ipv4If](https://pubhub.devnetcloud.com/media/dme-docs-10-2-2/docs/System/l2:BD/)

## Example Usage

```terraform
resource "nxos_bridge_domain" "example" {
fabric_encap = "vlan-10"
access_encap = "unknown"
name = "VLAN10"
}
```

<!-- schema generated by tfplugindocs -->
## Schema

### Required

- **fabric_encap** (String) Fabric encapsulation. Possible values are `unknown`, `vlan-XX` or `vxlan-XX`.
- Default value: `unknown`

### Optional

- **access_encap** (String) Access encapsulation. Possible values are `unknown`, `vlan-XX` or `vxlan-XX`.
- Default value: `unknown`
- **name** (String) Bridge domain name.

### Read-Only

- **id** (String) The distinguished name of the object.

## Import

Import is supported using the following syntax:

```shell
terraform import nxos_bridge_domain.example "sys/bd/bd-[vlan-10]"
```
46 changes: 46 additions & 0 deletions docs/resources/vrf.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "nxos_vrf Resource - terraform-provider-nxos"
subcategory: ""
description: |-
This resource can manage a VRF.
API Documentation: ipv4If https://pubhub.devnetcloud.com/media/dme-docs-10-2-2/docs/System/l3:Inst/
---

# nxos_vrf (Resource)

This resource can manage a VRF.

- API Documentation: [ipv4If](https://pubhub.devnetcloud.com/media/dme-docs-10-2-2/docs/System/l3:Inst/)

## Example Usage

```terraform
resource "nxos_vrf" "example" {
name = "VRF1"
description = "My VRF1 Description"
}
```

<!-- schema generated by tfplugindocs -->
## Schema

### Required

- **name** (String) VRF name.

### Optional

- **description** (String) VRF description.

### Read-Only

- **id** (String) The distinguished name of the object.

## Import

Import is supported using the following syntax:

```shell
terraform import nxos_vrf.example "sys/inst-[VRF1]"
```
41 changes: 41 additions & 0 deletions docs/resources/vrf_container.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "nxos_vrf_container Resource - terraform-provider-nxos"
subcategory: ""
description: |-
This resource can manage a VRF container.
API Documentation: ipv4If https://pubhub.devnetcloud.com/media/dme-docs-10-2-2/docs/System/l3:Inst/
---

# nxos_vrf_container (Resource)

This resource can manage a VRF container.

- API Documentation: [ipv4If](https://pubhub.devnetcloud.com/media/dme-docs-10-2-2/docs/System/l3:Inst/)

## Example Usage

```terraform
resource "nxos_vrf_container" "example" {
name = "VRF1"
}
```

<!-- schema generated by tfplugindocs -->
## Schema

### Required

- **name** (String) VRF name.

### Read-Only

- **id** (String) The distinguished name of the object.

## Import

Import is supported using the following syntax:

```shell
terraform import nxos_vrf_container.example "sys/ipv4/inst/dom-[VRF1]"
```
3 changes: 3 additions & 0 deletions examples/data-sources/nxos_bridge_domain/data-source.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
data "nxos_bridge_domain" "example" {
fabric_encap = "vlan-10"
}
3 changes: 3 additions & 0 deletions examples/data-sources/nxos_vrf/data-source.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
data "nxos_vrf" "example" {
name = "VRF1"
}
3 changes: 3 additions & 0 deletions examples/data-sources/nxos_vrf_container/data-source.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
data "nxos_vrf_container" "example" {
name = "VRF1"
}
1 change: 1 addition & 0 deletions examples/resources/nxos_bridge_domain/import.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
terraform import nxos_bridge_domain.example "sys/bd/bd-[vlan-10]"
5 changes: 5 additions & 0 deletions examples/resources/nxos_bridge_domain/resource.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
resource "nxos_bridge_domain" "example" {
fabric_encap = "vlan-10"
access_encap = "unknown"
name = "VLAN10"
}
1 change: 1 addition & 0 deletions examples/resources/nxos_vrf/import.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
terraform import nxos_vrf.example "sys/inst-[VRF1]"
4 changes: 4 additions & 0 deletions examples/resources/nxos_vrf/resource.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
resource "nxos_vrf" "example" {
name = "VRF1"
description = "My VRF1 Description"
}
1 change: 1 addition & 0 deletions examples/resources/nxos_vrf_container/import.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
terraform import nxos_vrf_container.example "sys/ipv4/inst/dom-[VRF1]"
3 changes: 3 additions & 0 deletions examples/resources/nxos_vrf_container/resource.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
resource "nxos_vrf_container" "example" {
name = "VRF1"
}
27 changes: 27 additions & 0 deletions gen/definitions/bridge_domain.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
name: Bridge Domain
class_name: l2BD
dn: sys/bd/bd-[%s]
ds_description: |-
This data source can read a bridge domain.
res_description: |-
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/)
attributes:
- nxos_name: fabEncap
tf_name: fabric_encap
type: String
id: true
description: 'Fabric encapsulation. Possible values are `unknown`, `vlan-XX` or `vxlan-XX`.'
default_value: unknown
example: vlan-10
- nxos_name: accEncap
tf_name: access_encap
type: String
description: 'Access encapsulation. Possible values are `unknown`, `vlan-XX` or `vxlan-XX`.'
default_value: unknown
example: unknown
- nxos_name: name
tf_name: name
type: String
description: 'Bridge domain name.'
example: VLAN10
20 changes: 20 additions & 0 deletions gen/definitions/vrf.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: VRF
class_name: l3Inst
dn: sys/inst-[%s]
ds_description: |-
This data source can read a VRF.
res_description: |-
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/)
attributes:
- nxos_name: name
tf_name: name
type: String
id: true
description: 'VRF name.'
example: 'VRF1'
- nxos_name: descr
tf_name: description
type: String
description: 'VRF description.'
example: My VRF1 Description
15 changes: 15 additions & 0 deletions gen/definitions/vrf_container.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
name: VRF Container
class_name: ipv4Dom
dn: sys/ipv4/inst/dom-[%s]
ds_description: |-
This data source can read a VRF container.
res_description: |-
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/)
attributes:
- nxos_name: name
tf_name: name
type: String
id: true
description: 'VRF name.'
example: 'VRF1'
Loading

0 comments on commit 20cb4cf

Please sign in to comment.