Skip to content

Commit

Permalink
Add fabric_l3_handoff_ip_transit resource and data source (#101)
Browse files Browse the repository at this point in the history
  • Loading branch information
kuba-mazurkiewicz authored Aug 2, 2024
1 parent 38fe7d5 commit 5d4fb27
Show file tree
Hide file tree
Showing 15 changed files with 1,231 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
## 0.1.10 (unreleased)

- Add `fabric_l3_handoff_ip_transit` resource and data source
- Add `transitPeerNetworkId` as `id` to `transit_peer_network` resource
- Add `anycast_gateway` resource and data source, this resource now only works with Catalyst Center version 2.3.7.5+ `/sda/anycastGateways`
- BREAKING CHANGE: Modified `fabric_site` resource to use `/dna/intent/api/v1/sda/fabricSites` API endpoint, this resource now only works with Catalyst Center version 2.3.7.5+
Expand Down
43 changes: 43 additions & 0 deletions docs/data-sources/fabric_l3_handoff_ip_transit.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "catalystcenter_fabric_l3_handoff_ip_transit Data Source - terraform-provider-catalystcenter"
subcategory: "SDA"
description: |-
This data source can read the Fabric L3 Handoff IP Transit.
---

# catalystcenter_fabric_l3_handoff_ip_transit (Data Source)

This data source can read the Fabric L3 Handoff IP Transit.

## Example Usage

```terraform
data "catalystcenter_fabric_l3_handoff_ip_transit" "example" {
id = "76d24097-41c4-4558-a4d0-a8c07ac08470"
network_device_id = "5e6f7b3a-2b0b-4a7d-8b1c-0d4b1cd5e1b1"
fabric_id = "c4b85bb2-ce3f-4db9-a32b-e439a388ac2f"
}
```

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

### Required

- `fabric_id` (String) ID of the fabric this device belongs to
- `id` (String) The id of the object
- `network_device_id` (String) Network device ID of the fabric device

### Read-Only

- `external_connectivity_ip_pool_name` (String) External connectivity ip pool will be used by Catalyst Center to allocate IP address for the connection between the border node and peer
- `interface_name` (String) Interface name of the layer 3 handoff ip transit
- `local_ip_address` (String) Local ipv4 address for the selected virtual network. Enter the IP addresses and subnet mask in the CIDR notation (IP address/prefix-length). Not applicable if you have already provided an external connectivity ip pool name
- `local_ipv6_address` (String) Local ipv6 address for the selected virtual network. Enter the IP addresses and subnet mask in the CIDR notation (IP address/prefix-length). Not applicable if you have already provided an external connectivity ip pool name
- `remote_ip_address` (String) Remote ipv4 address for the selected virtual network. Enter the IP addresses and subnet mask in the CIDR notation (IP address/prefix-length). Not applicable if you have already provided an external connectivity ip pool name
- `remote_ipv6_address` (String) Remote ipv6 address for the selected virtual network. Enter the IP addresses and subnet mask in the CIDR notation (IP address/prefix-length). Not applicable if you have already provided an external connectivity ip pool name
- `tcp_mss_adjustment` (Number) TCP maximum segment size (mss) value for the layer 3 handoff. Allowed range is [500-1440]. TCP MSS Adjustment value is applicable for the TCP sessions over both IPv4 and IPv6
- `transit_network_id` (String) ID of the transit network of the layer 3 handoff ip transit
- `virtual_network_name` (String) SName of the virtual network associated with this fabric site
- `vlan_id` (Number) VLAN number for the Switch Virtual Interface (SVI) used to establish BGP peering with the external domain for the virtual network. Allowed VLAN range is 2-4094 except for reserved vlans (1, 1002-1005, 2046, 4094)
1 change: 1 addition & 0 deletions docs/guides/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ description: |-

## 0.1.10 (unreleased)

- Add `fabric_l3_handoff_ip_transit` resource and data source
- Add `transitPeerNetworkId` as `id` to `transit_peer_network` resource
- Add `anycast_gateway` resource and data source, this resource now only works with Catalyst Center version 2.3.7.5+ `/sda/anycastGateways`
- BREAKING CHANGE: Modified `fabric_site` resource to use `/dna/intent/api/v1/sda/fabricSites` API endpoint, this resource now only works with Catalyst Center version 2.3.7.5+
Expand Down
61 changes: 61 additions & 0 deletions docs/resources/fabric_l3_handoff_ip_transit.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "catalystcenter_fabric_l3_handoff_ip_transit Resource - terraform-provider-catalystcenter"
subcategory: "SDA"
description: |-
Manages Layer 3 Handoffs with IP Transit in Fabric Devices
---

# catalystcenter_fabric_l3_handoff_ip_transit (Resource)

Manages Layer 3 Handoffs with IP Transit in Fabric Devices

## Example Usage

```terraform
resource "catalystcenter_fabric_l3_handoff_ip_transit" "example" {
network_device_id = "5e6f7b3a-2b0b-4a7d-8b1c-0d4b1cd5e1b1"
fabric_id = "c4b85bb2-ce3f-4db9-a32b-e439a388ac2f"
transit_network_id = "d71c847b-e9c2-4f13-928c-223372b72b06"
interface_name = "TenGigabitEthernet1/0/2"
virtual_network_name = "SDA_VN1"
vlan_id = 205
tcp_mss_adjustment = 1400
local_ip_address = "10.0.0.1/24"
remote_ip_address = "10.0.0.2/24"
}
```

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

### Required

- `fabric_id` (String) ID of the fabric this device belongs to
- `network_device_id` (String) Network device ID of the fabric device
- `transit_network_id` (String) ID of the transit network of the layer 3 handoff ip transit
- `virtual_network_name` (String) SName of the virtual network associated with this fabric site
- `vlan_id` (Number) VLAN number for the Switch Virtual Interface (SVI) used to establish BGP peering with the external domain for the virtual network. Allowed VLAN range is 2-4094 except for reserved vlans (1, 1002-1005, 2046, 4094)

### Optional

- `external_connectivity_ip_pool_name` (String) External connectivity ip pool will be used by Catalyst Center to allocate IP address for the connection between the border node and peer
- `interface_name` (String) Interface name of the layer 3 handoff ip transit
- `local_ip_address` (String) Local ipv4 address for the selected virtual network. Enter the IP addresses and subnet mask in the CIDR notation (IP address/prefix-length). Not applicable if you have already provided an external connectivity ip pool name
- `local_ipv6_address` (String) Local ipv6 address for the selected virtual network. Enter the IP addresses and subnet mask in the CIDR notation (IP address/prefix-length). Not applicable if you have already provided an external connectivity ip pool name
- `remote_ip_address` (String) Remote ipv4 address for the selected virtual network. Enter the IP addresses and subnet mask in the CIDR notation (IP address/prefix-length). Not applicable if you have already provided an external connectivity ip pool name
- `remote_ipv6_address` (String) Remote ipv6 address for the selected virtual network. Enter the IP addresses and subnet mask in the CIDR notation (IP address/prefix-length). Not applicable if you have already provided an external connectivity ip pool name
- `tcp_mss_adjustment` (Number) TCP maximum segment size (mss) value for the layer 3 handoff. Allowed range is [500-1440]. TCP MSS Adjustment value is applicable for the TCP sessions over both IPv4 and IPv6
- Range: `500`-`1440`

### Read-Only

- `id` (String) The id of the object

## Import

Import is supported using the following syntax:

```shell
terraform import catalystcenter_fabric_l3_handoff_ip_transit.example "<network_device_id>,<fabric_id>,<id>"
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
data "catalystcenter_fabric_l3_handoff_ip_transit" "example" {
id = "76d24097-41c4-4558-a4d0-a8c07ac08470"
network_device_id = "5e6f7b3a-2b0b-4a7d-8b1c-0d4b1cd5e1b1"
fabric_id = "c4b85bb2-ce3f-4db9-a32b-e439a388ac2f"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
terraform import catalystcenter_fabric_l3_handoff_ip_transit.example "<network_device_id>,<fabric_id>,<id>"
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
resource "catalystcenter_fabric_l3_handoff_ip_transit" "example" {
network_device_id = "5e6f7b3a-2b0b-4a7d-8b1c-0d4b1cd5e1b1"
fabric_id = "c4b85bb2-ce3f-4db9-a32b-e439a388ac2f"
transit_network_id = "d71c847b-e9c2-4f13-928c-223372b72b06"
interface_name = "TenGigabitEthernet1/0/2"
virtual_network_name = "SDA_VN1"
vlan_id = 205
tcp_mss_adjustment = 1400
local_ip_address = "10.0.0.1/24"
remote_ip_address = "10.0.0.2/24"
}
125 changes: 125 additions & 0 deletions gen/definitions/fabric_l3_handoff_ip_transit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
---
name: Fabric L3 Handoff IP Transit
rest_endpoint: /dna/intent/api/v1/sda/fabricDevices/layer3Handoffs/ipTransits
res_description: Manages Layer 3 Handoffs with IP Transit in Fabric Devices
id_from_query_path: response
id_from_query_path_attribute: id
put_id_include_path: 0.id
get_from_all: true
put_no_id: true
doc_category: SDA
test_tags: [SDA]
attributes:
- model_name: networkDeviceId
query_param: true
requires_replace: true
data_path: '0'
response_data_path: networkDeviceId
mandatory: true
description: Network device ID of the fabric device
type: String
example: 5e6f7b3a-2b0b-4a7d-8b1c-0d4b1cd5e1b1
- model_name: fabricId
requires_replace: true
query_param: true
data_path: '0'
response_data_path: fabricId
type: String
mandatory: true
description: ID of the fabric this device belongs to
example: c4b85bb2-ce3f-4db9-a32b-e439a388ac2f
test_value: catalystcenter_fabric_site.test.id
- model_name: transitNetworkId
requires_replace: true
data_path: '0'
response_data_path: transitNetworkId
type: String
mandatory: true
description: ID of the transit network of the layer 3 handoff ip transit
example: d71c847b-e9c2-4f13-928c-223372b72b06
test_value: catalystcenter_transit_peer_network.test.id
- model_name: interfaceName
data_path: '0'
requires_replace: true
response_data_path: interfaceName
type: String
description: Interface name of the layer 3 handoff ip transit
example: TenGigabitEthernet1/0/2
- model_name: externalConnectivityIpPoolName
data_path: '0'
requires_replace: true
response_data_path: externalConnectivityIpPoolName
type: String
description: External connectivity ip pool will be used by Catalyst Center to allocate IP address for the connection between the border node and peer
example: "MyPool1"
exclude_test: true
- model_name: virtualNetworkName
data_path: '0'
requires_replace: true
match_id: true
response_data_path: virtualNetworkName
mandatory: true
type: String
description: SName of the virtual network associated with this fabric site
example: SDA_VN1
- model_name: vlanId
data_path: '0'
requires_replace: true
response_data_path: vlanId
type: Int64
mandatory: true
description: VLAN number for the Switch Virtual Interface (SVI) used to establish BGP peering with the external domain for the virtual network. Allowed VLAN range is 2-4094 except for reserved vlans (1, 1002-1005, 2046, 4094)
example: 205
- model_name: tcpMssAdjustment
data_path: '0'
response_data_path: tcpMssAdjustment
type: Int64
min_int: 500
max_int: 1440
description: TCP maximum segment size (mss) value for the layer 3 handoff. Allowed range is [500-1440]. TCP MSS Adjustment value is applicable for the TCP sessions over both IPv4 and IPv6
example: 1400
- model_name: localIpAddress
data_path: '0'
requires_replace: true
response_data_path: localIpAddress
type: String
description: Local ipv4 address for the selected virtual network. Enter the IP addresses and subnet mask in the CIDR notation (IP address/prefix-length). Not applicable if you have already provided an external connectivity ip pool name
example: "10.0.0.1/24"
- model_name: remoteIpAddress
data_path: '0'
requires_replace: true
response_data_path: remoteIpAddress
type: String
description: Remote ipv4 address for the selected virtual network. Enter the IP addresses and subnet mask in the CIDR notation (IP address/prefix-length). Not applicable if you have already provided an external connectivity ip pool name
example: "10.0.0.2/24"
- model_name: localIpv6Address
data_path: '0'
requires_replace: true
response_data_path: localIpv6Address
type: String
description: Local ipv6 address for the selected virtual network. Enter the IP addresses and subnet mask in the CIDR notation (IP address/prefix-length). Not applicable if you have already provided an external connectivity ip pool name
exclude_test: true
- model_name: remoteIpv6Address
data_path: '0'
requires_replace: true
response_data_path: remoteIpv6Address
type: String
description: Remote ipv6 address for the selected virtual network. Enter the IP addresses and subnet mask in the CIDR notation (IP address/prefix-length). Not applicable if you have already provided an external connectivity ip pool name
exclude_test: true
test_prerequisites: |
resource "catalystcenter_area" "test" {
name = "Area1"
parent_name = "Global"
}
resource "catalystcenter_fabric_site" "test" {
site_id = catalystcenter_area.test.id
pub_sub_enabled = false
authentication_profile_name = "No Authentication"
depends_on = [catalystcenter_area.test]
}
resource "catalystcenter_transit_peer_network" "test" {
transit_peer_network_name = "TRANSIT_1"
transit_peer_network_type = "ip_transit"
routing_protocol_name = "BGP"
autonomous_system_number = "65010"
}
Loading

0 comments on commit 5d4fb27

Please sign in to comment.