Skip to content

Commit f0b2c10

Browse files
committed
Add ipv4 interface and address resource
1 parent d7d62e7 commit f0b2c10

36 files changed

+1239
-44
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## 0.2.2 (unreleased)
2+
3+
- Add nxos_ipv4_interface resource and data source
4+
- Add nxos_ipv4_interface_address resource and data source
5+
16
## 0.2.1
27

38
- Add nxos_pyhsical_interface resource and data source
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
---
2+
# generated by https://github.com/hashicorp/terraform-plugin-docs
3+
page_title: "nxos_ipv4_interface Data Source - terraform-provider-nxos"
4+
subcategory: ""
5+
description: |-
6+
This data source can read an IPv4 interface.
7+
---
8+
9+
# nxos_ipv4_interface (Data Source)
10+
11+
This data source can read an IPv4 interface.
12+
13+
## Example Usage
14+
15+
```terraform
16+
data "nxos_ipv4_interface" "example" {
17+
vrf = "default"
18+
interface_id = "eth1/59"
19+
}
20+
```
21+
22+
<!-- schema generated by tfplugindocs -->
23+
## Schema
24+
25+
### Required
26+
27+
- **interface_id** (String) Must match first field in the output of `show intf brief`. Example: `eth1/1`.
28+
- **vrf** (String) VRF name.
29+
30+
### Read-Only
31+
32+
- **id** (String) The distinguished name of the object.
33+
- **unnumbered** (String) IP unnumbered. Reference to interface must match first field in the output of `show intf brief`. Example: `eth1/1`.
34+
- **urpf** (String) URPF (unicast Reverse Path Forwarding).
35+
36+
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
---
2+
# generated by https://github.com/hashicorp/terraform-plugin-docs
3+
page_title: "nxos_ipv4_interface_address Data Source - terraform-provider-nxos"
4+
subcategory: ""
5+
description: |-
6+
This data source can read an IPv4 interface address.
7+
---
8+
9+
# nxos_ipv4_interface_address (Data Source)
10+
11+
This data source can read an IPv4 interface address.
12+
13+
## Example Usage
14+
15+
```terraform
16+
data "nxos_ipv4_interface_address" "example" {
17+
vrf = "default"
18+
interface_id = "eth1/59"
19+
address = "1.1.1.1/24"
20+
}
21+
```
22+
23+
<!-- schema generated by tfplugindocs -->
24+
## Schema
25+
26+
### Required
27+
28+
- **address** (String) IPv4 address.
29+
- **interface_id** (String) Must match first field in the output of `show intf brief`. Example: `eth1/1`.
30+
- **vrf** (String) VRF name.
31+
32+
### Read-Only
33+
34+
- **id** (String) The distinguished name of the object.
35+
36+

docs/resources/ipv4_interface.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
---
2+
# generated by https://github.com/hashicorp/terraform-plugin-docs
3+
page_title: "nxos_ipv4_interface Resource - terraform-provider-nxos"
4+
subcategory: ""
5+
description: |-
6+
This resource can manage an IPv4 interface.
7+
API Documentation: ipv4If https://pubhub.devnetcloud.com/media/dme-docs-10-2-2/docs/System/ipv4:If/
8+
---
9+
10+
# nxos_ipv4_interface (Resource)
11+
12+
This resource can manage an IPv4 interface.
13+
14+
- API Documentation: [ipv4If](https://pubhub.devnetcloud.com/media/dme-docs-10-2-2/docs/System/ipv4:If/)
15+
16+
## Example Usage
17+
18+
```terraform
19+
resource "nxos_ipv4_interface" "example" {
20+
vrf = "default"
21+
interface_id = "eth1/59"
22+
unnumbered = "unspecified"
23+
urpf = "disabled"
24+
}
25+
```
26+
27+
<!-- schema generated by tfplugindocs -->
28+
## Schema
29+
30+
### Required
31+
32+
- **interface_id** (String) Must match first field in the output of `show intf brief`. Example: `eth1/1`.
33+
- **vrf** (String) VRF name.
34+
35+
### Optional
36+
37+
- **unnumbered** (String) IP unnumbered. Reference to interface must match first field in the output of `show intf brief`. Example: `eth1/1`.
38+
- Default value: `unspecified`
39+
- **urpf** (String) URPF (unicast Reverse Path Forwarding).
40+
- Choices: `disabled`, `strict`, `loose`, `loose-allow-default`, `strict-allow-vni-hosts`
41+
- Default value: `disabled`
42+
43+
### Read-Only
44+
45+
- **id** (String) The distinguished name of the object.
46+
47+
## Import
48+
49+
Import is supported using the following syntax:
50+
51+
```shell
52+
terraform import nxos_ipv4_interface.example "sys/ipv4/inst/dom-[default]/if-[eth1/59]"
53+
```
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
---
2+
# generated by https://github.com/hashicorp/terraform-plugin-docs
3+
page_title: "nxos_ipv4_interface_address Resource - terraform-provider-nxos"
4+
subcategory: ""
5+
description: |-
6+
This resource can manage an IPv4 interface address.
7+
API Documentation: ipv4Addr https://pubhub.devnetcloud.com/media/dme-docs-10-2-2/docs/System/ipv4:Addr/
8+
---
9+
10+
# nxos_ipv4_interface_address (Resource)
11+
12+
This resource can manage an IPv4 interface address.
13+
14+
- API Documentation: [ipv4Addr](https://pubhub.devnetcloud.com/media/dme-docs-10-2-2/docs/System/ipv4:Addr/)
15+
16+
## Example Usage
17+
18+
```terraform
19+
resource "nxos_ipv4_interface_address" "example" {
20+
vrf = "default"
21+
interface_id = "eth1/59"
22+
address = "1.1.1.1/24"
23+
}
24+
```
25+
26+
<!-- schema generated by tfplugindocs -->
27+
## Schema
28+
29+
### Required
30+
31+
- **address** (String) IPv4 address.
32+
- **interface_id** (String) Must match first field in the output of `show intf brief`. Example: `eth1/1`.
33+
- **vrf** (String) VRF name.
34+
35+
### Read-Only
36+
37+
- **id** (String) The distinguished name of the object.
38+
39+
## Import
40+
41+
Import is supported using the following syntax:
42+
43+
```shell
44+
terraform import nxos_ipv4_interface_address.example "sys/ipv4/inst/dom-[default]/if-[eth1/59]/addr-[1.1.1.1/24]"
45+
```
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
data "nxos_ipv4_interface" "example" {
2+
vrf = "default"
3+
interface_id = "eth1/59"
4+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
data "nxos_ipv4_interface_address" "example" {
2+
vrf = "default"
3+
interface_id = "eth1/59"
4+
address = "1.1.1.1/24"
5+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
terraform import nxos_ipv4_interface.example "sys/ipv4/inst/dom-[default]/if-[eth1/59]"
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
resource "nxos_ipv4_interface" "example" {
2+
vrf = "default"
3+
interface_id = "eth1/59"
4+
unnumbered = "unspecified"
5+
urpf = "disabled"
6+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
terraform import nxos_ipv4_interface_address.example "sys/ipv4/inst/dom-[default]/if-[eth1/59]/addr-[1.1.1.1/24]"

0 commit comments

Comments
 (0)