Skip to content

modify transit_peer_network resource to add id #100

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Aug 2, 2024
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
## 0.1.10 (unreleased)

- 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+
- Fix issue with mandatory attributes in `transit_peer_network` resource, [link](https://github.com/CiscoDevNet/terraform-provider-catalystcenter/issues/92)
- BREAKING CHANGE: Fix `ip_pool` update if more than 25 pools are registered
Expand Down
48 changes: 48 additions & 0 deletions docs/data-sources/anycast_gateway.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "catalystcenter_anycast_gateway Data Source - terraform-provider-catalystcenter"
subcategory: "SDA"
description: |-
This data source can read the Anycast Gateway.
---

# catalystcenter_anycast_gateway (Data Source)

This data source can read the Anycast Gateway.

## Example Usage

```terraform
data "catalystcenter_anycast_gateway" "example" {
fabric_id = "5e6f7b3a-2b0b-4a7d-8b1c-0d4b1cd5e1b1"
virtual_network_name = "SDA_VN1"
ip_pool_name = "MyRes1"
}
```

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

### Required

- `fabric_id` (String) ID of the fabric to contain this anycast gateway
- `ip_pool_name` (String) Name of the IP pool associated with the anycast gateway
- `virtual_network_name` (String) Name of the layer 3 virtual network associated with the anycast gateway. the virtual network must have already been added to the site before creating an anycast gateway with it

### Read-Only

- `auto_generate_vlan_name` (Boolean) This field cannot be true when vlanName is provided. the vlanName will be generated as ipPoolGroupV4Cidr-virtualNetworkName for non-critical VLANs. for critical VLANs with DATA trafficType, vlanName will be CRITICAL_VLAN. for critical VLANs with VOICE trafficType, vlanName will be VOICE_VLAN
- `critical_pool` (Boolean) Enable/disable critical VLAN. if true, autoGenerateVlanName must also be true. (isCriticalPool is not applicable to INFRA_VN)
- `id` (String) The id of the object
- `intra_subnet_routing_enabled` (Boolean) Enable/disable Intra-Subnet Routing (not applicable to INFRA_VN)
- `ip_directed_broadcast` (Boolean) Enable/disable IP-directed broadcast (not applicable to INFRA_VN)
- `l2_flooding_enabled` (Boolean) Enable/disable layer 2 flooding (not applicable to INFRA_VN)
- `multiple_ip_to_mac_addresses` (Boolean) Enable/disable multiple IP-to-MAC Addresses (Wireless Bridged-Network Virtual Machine; not applicable to INFRA_VN)
- `pool_type` (String) The pool type of the anycast gateway (required for & applicable only to INFRA_VN)
- `security_group_name` (String) Name of the associated Security Group (not applicable to INFRA_VN)
- `supplicant_based_extended_node_onboarding` (Boolean) Enable/disable Supplicant-Based Extended Node Onboarding (applicable only to INFRA_VN)
- `tcp_mss_adjustment` (Number) TCP maximum segment size adjustment
- `traffic_type` (String) The type of traffic the anycast gateway serves
- `vlan_id` (Number) ID of the VLAN of the anycast gateway. allowed VLAN range is 2-4093 except for reserved VLANs 1002-1005, 2046, and 4094. if deploying an anycast gateway on a fabric zone, this vlanId must match the vlanId of the corresponding anycast gateway on the fabric site
- `vlan_name` (String) Name of the VLAN of the anycast gateway
- `wireless_pool` (Boolean) Enable/disable fabric-enabled wireless (not applicable to INFRA_VN)
6 changes: 3 additions & 3 deletions docs/data-sources/transit_peer_network.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,21 @@ This data source can read the Transit Peer Network.

```terraform
data "catalystcenter_transit_peer_network" "example" {
id = "TRANSIT_1"
transit_peer_network_name = "TRANSIT_1"
}
```

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

### Optional
### Required

- `id` (String) The id of the object
- `transit_peer_network_name` (String) Transit Peer Network Name

### Read-Only

- `autonomous_system_number` (String) Autonomous System Number
- `id` (String) The id of the object
- `routing_protocol_name` (String) Routing Protocol Name
- `transit_control_plane_settings` (Attributes List) Transit Control Plane Settings info (see [below for nested schema](#nestedatt--transit_control_plane_settings))
- `transit_peer_network_type` (String) Transit Peer Network Type
Expand Down
2 changes: 2 additions & 0 deletions docs/guides/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ description: |-

## 0.1.10 (unreleased)

- 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+
- Fix issue with mandatory attributes in `transit_peer_network` resource, [link](https://github.com/CiscoDevNet/terraform-provider-catalystcenter/issues/92)
- BREAKING CHANGE: Fix `ip_pool` update if more than 25 pools are registered
Expand Down
72 changes: 72 additions & 0 deletions docs/resources/anycast_gateway.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "catalystcenter_anycast_gateway Resource - terraform-provider-catalystcenter"
subcategory: "SDA"
description: |-
Manages Anycast Gateways
---

# catalystcenter_anycast_gateway (Resource)

Manages Anycast Gateways

## Example Usage

```terraform
resource "catalystcenter_anycast_gateway" "example" {
fabric_id = "5e6f7b3a-2b0b-4a7d-8b1c-0d4b1cd5e1b1"
virtual_network_name = "SDA_VN1"
ip_pool_name = "MyRes1"
tcp_mss_adjustment = 1400
vlan_name = "VLAN401"
vlan_id = 401
traffic_type = "DATA"
critical_pool = false
l2_flooding_enabled = false
wireless_pool = false
ip_directed_broadcast = false
intra_subnet_routing_enabled = false
multiple_ip_to_mac_addresses = false
}
```

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

### Required

- `critical_pool` (Boolean) Enable/disable critical VLAN. if true, autoGenerateVlanName must also be true. (isCriticalPool is not applicable to INFRA_VN)
- `fabric_id` (String) ID of the fabric to contain this anycast gateway
- `intra_subnet_routing_enabled` (Boolean) Enable/disable Intra-Subnet Routing (not applicable to INFRA_VN)
- `ip_directed_broadcast` (Boolean) Enable/disable IP-directed broadcast (not applicable to INFRA_VN)
- `ip_pool_name` (String) Name of the IP pool associated with the anycast gateway
- `l2_flooding_enabled` (Boolean) Enable/disable layer 2 flooding (not applicable to INFRA_VN)
- `multiple_ip_to_mac_addresses` (Boolean) Enable/disable multiple IP-to-MAC Addresses (Wireless Bridged-Network Virtual Machine; not applicable to INFRA_VN)
- `traffic_type` (String) The type of traffic the anycast gateway serves
- Choices: `DATA`, `VOICE`
- `virtual_network_name` (String) Name of the layer 3 virtual network associated with the anycast gateway. the virtual network must have already been added to the site before creating an anycast gateway with it
- `vlan_name` (String) Name of the VLAN of the anycast gateway
- `wireless_pool` (Boolean) Enable/disable fabric-enabled wireless (not applicable to INFRA_VN)

### Optional

- `auto_generate_vlan_name` (Boolean) This field cannot be true when vlanName is provided. the vlanName will be generated as ipPoolGroupV4Cidr-virtualNetworkName for non-critical VLANs. for critical VLANs with DATA trafficType, vlanName will be CRITICAL_VLAN. for critical VLANs with VOICE trafficType, vlanName will be VOICE_VLAN
- `pool_type` (String) The pool type of the anycast gateway (required for & applicable only to INFRA_VN)
- Choices: `EXTENDED_NODE`, `FABRIC_AP`
- `security_group_name` (String) Name of the associated Security Group (not applicable to INFRA_VN)
- `supplicant_based_extended_node_onboarding` (Boolean) Enable/disable Supplicant-Based Extended Node Onboarding (applicable only to INFRA_VN)
- `tcp_mss_adjustment` (Number) TCP maximum segment size adjustment
- Range: `500`-`1440`
- `vlan_id` (Number) ID of the VLAN of the anycast gateway. allowed VLAN range is 2-4093 except for reserved VLANs 1002-1005, 2046, and 4094. if deploying an anycast gateway on a fabric zone, this vlanId must match the vlanId of the corresponding anycast gateway on the fabric site

### Read-Only

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

## Import

Import is supported using the following syntax:

```shell
terraform import catalystcenter_anycast_gateway.example "<fabric_id>,<virtual_network_name>,<ip_pool_name>"
```
6 changes: 0 additions & 6 deletions docs/resources/transit_peer_network.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,6 @@ resource "catalystcenter_transit_peer_network" "example" {
transit_peer_network_type = "ip_transit"
routing_protocol_name = "BGP"
autonomous_system_number = "65010"
transit_control_plane_settings = [
{
site_name_hierarchy = "Global/Area1"
device_management_ip_address = "10.0.0.1"
}
]
}
```

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
data "catalystcenter_anycast_gateway" "example" {
fabric_id = "5e6f7b3a-2b0b-4a7d-8b1c-0d4b1cd5e1b1"
virtual_network_name = "SDA_VN1"
ip_pool_name = "MyRes1"
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
data "catalystcenter_transit_peer_network" "example" {
id = "TRANSIT_1"
transit_peer_network_name = "TRANSIT_1"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
terraform import catalystcenter_anycast_gateway.example "<fabric_id>,<virtual_network_name>,<ip_pool_name>"
15 changes: 15 additions & 0 deletions examples/resources/catalystcenter_anycast_gateway/resource.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
resource "catalystcenter_anycast_gateway" "example" {
fabric_id = "5e6f7b3a-2b0b-4a7d-8b1c-0d4b1cd5e1b1"
virtual_network_name = "SDA_VN1"
ip_pool_name = "MyRes1"
tcp_mss_adjustment = 1400
vlan_name = "VLAN401"
vlan_id = 401
traffic_type = "DATA"
critical_pool = false
l2_flooding_enabled = false
wireless_pool = false
ip_directed_broadcast = false
intra_subnet_routing_enabled = false
multiple_ip_to_mac_addresses = false
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,4 @@ resource "catalystcenter_transit_peer_network" "example" {
transit_peer_network_type = "ip_transit"
routing_protocol_name = "BGP"
autonomous_system_number = "65010"
transit_control_plane_settings = [
{
site_name_hierarchy = "Global/Area1"
device_management_ip_address = "10.0.0.1"
}
]
}
Loading