Skip to content

Commit 7d51440

Browse files
Merge branch 'main' into pnp
2 parents 9a6533c + 37789d4 commit 7d51440

17 files changed

+104
-82
lines changed

docs/data-sources/fabric_l3_handoff_ip_transit.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ This data source can read the Fabric L3 Handoff IP Transit.
1414

1515
```terraform
1616
data "catalystcenter_fabric_l3_handoff_ip_transit" "example" {
17+
id = "76d24097-41c4-4558-a4d0-a8c07ac08470"
1718
network_device_id = "5e6f7b3a-2b0b-4a7d-8b1c-0d4b1cd5e1b1"
1819
fabric_id = "c4b85bb2-ce3f-4db9-a32b-e439a388ac2f"
1920
}
@@ -25,12 +26,12 @@ data "catalystcenter_fabric_l3_handoff_ip_transit" "example" {
2526
### Required
2627

2728
- `fabric_id` (String) ID of the fabric this device belongs to
29+
- `id` (String) The id of the object
2830
- `network_device_id` (String) Network device ID of the fabric device
2931

3032
### Read-Only
3133

3234
- `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
33-
- `id` (String) The id of the object
3435
- `interface_name` (String) Interface name of the layer 3 handoff ip transit
3536
- `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
3637
- `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

docs/resources/fabric_l3_handoff_ip_transit.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,5 +57,5 @@ resource "catalystcenter_fabric_l3_handoff_ip_transit" "example" {
5757
Import is supported using the following syntax:
5858

5959
```shell
60-
terraform import catalystcenter_fabric_l3_handoff_ip_transit.example "<network_device_id>,<fabric_id>"
60+
terraform import catalystcenter_fabric_l3_handoff_ip_transit.example "<network_device_id>,<fabric_id>,<id>"
6161
```
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
data "catalystcenter_fabric_l3_handoff_ip_transit" "example" {
2+
id = "76d24097-41c4-4558-a4d0-a8c07ac08470"
23
network_device_id = "5e6f7b3a-2b0b-4a7d-8b1c-0d4b1cd5e1b1"
34
fabric_id = "c4b85bb2-ce3f-4db9-a32b-e439a388ac2f"
45
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
terraform import catalystcenter_fabric_l3_handoff_ip_transit.example "<network_device_id>,<fabric_id>"
1+
terraform import catalystcenter_fabric_l3_handoff_ip_transit.example "<network_device_id>,<fabric_id>,<id>"

gen/definitions/fabric_authentication_profile.yaml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ id_query_param: siteNameHierarchy
66
delete_id_query_param: siteNameHierarchy
77
no_update: true
88
skip_minimum_test: true
9+
test_tags: [FABRIC]
910
doc_category: SDA
1011
attributes:
1112
- model_name: siteNameHierarchy
@@ -15,7 +16,7 @@ attributes:
1516
id: true
1617
description: Path of SDA Fabric Site
1718
example: Global/Site1
18-
test_value: 'catalystcenter_fabric_site.test.site_name_hierarchy'
19+
test_value: '"${catalystcenter_area.test.parent_name}/${catalystcenter_area.test.name}"'
1920
- model_name: authenticateTemplateName
2021
tf_name: authentication_template_name
2122
data_path: "0"
@@ -35,7 +36,9 @@ test_prerequisites: |
3536
name = "Area1"
3637
parent_name = "Global"
3738
}
39+
3840
resource "catalystcenter_fabric_site" "test" {
39-
site_name_hierarchy = "${catalystcenter_area.test.parent_name}/${catalystcenter_area.test.name}"
40-
fabric_type = "FABRIC_SITE"
41-
}
41+
site_id = catalystcenter_area.test.id
42+
authentication_profile_name = "No Authentication"
43+
pub_sub_enabled = false
44+
}

gen/definitions/fabric_l3_handoff_ip_transit.yaml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,10 @@
22
name: Fabric L3 Handoff IP Transit
33
rest_endpoint: /dna/intent/api/v1/sda/fabricDevices/layer3Handoffs/ipTransits
44
res_description: Manages Layer 3 Handoffs with IP Transit in Fabric Devices
5-
id_from_query_path: response.0
5+
id_from_query_path: response
66
id_from_query_path_attribute: id
77
put_id_include_path: 0.id
8-
import_no_id: true
9-
data_source_no_id: true
8+
get_from_all: true
109
put_no_id: true
1110
doc_category: SDA
1211
test_tags: [SDA]
@@ -15,7 +14,7 @@ attributes:
1514
query_param: true
1615
requires_replace: true
1716
data_path: '0'
18-
response_data_path: response.0.networkDeviceId
17+
response_data_path: networkDeviceId
1918
mandatory: true
2019
description: Network device ID of the fabric device
2120
type: String
@@ -24,7 +23,7 @@ attributes:
2423
requires_replace: true
2524
query_param: true
2625
data_path: '0'
27-
response_data_path: response.0.fabricId
26+
response_data_path: fabricId
2827
type: String
2928
mandatory: true
3029
description: ID of the fabric this device belongs to
@@ -33,7 +32,7 @@ attributes:
3332
- model_name: transitNetworkId
3433
requires_replace: true
3534
data_path: '0'
36-
response_data_path: response.0.transitNetworkId
35+
response_data_path: transitNetworkId
3736
type: String
3837
mandatory: true
3938
description: ID of the transit network of the layer 3 handoff ip transit
@@ -42,37 +41,38 @@ attributes:
4241
- model_name: interfaceName
4342
data_path: '0'
4443
requires_replace: true
45-
response_data_path: response.0.interfaceName
44+
response_data_path: interfaceName
4645
type: String
4746
description: Interface name of the layer 3 handoff ip transit
4847
example: TenGigabitEthernet1/0/2
4948
- model_name: externalConnectivityIpPoolName
5049
data_path: '0'
5150
requires_replace: true
52-
response_data_path: response.0.externalConnectivityIpPoolName
51+
response_data_path: externalConnectivityIpPoolName
5352
type: String
5453
description: External connectivity ip pool will be used by Catalyst Center to allocate IP address for the connection between the border node and peer
5554
example: "MyPool1"
5655
exclude_test: true
5756
- model_name: virtualNetworkName
5857
data_path: '0'
5958
requires_replace: true
60-
response_data_path: response.0.virtualNetworkName
59+
match_id: true
60+
response_data_path: virtualNetworkName
6161
mandatory: true
6262
type: String
6363
description: SName of the virtual network associated with this fabric site
6464
example: SDA_VN1
6565
- model_name: vlanId
6666
data_path: '0'
6767
requires_replace: true
68-
response_data_path: response.0.vlanId
68+
response_data_path: vlanId
6969
type: Int64
7070
mandatory: true
7171
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)
7272
example: 205
7373
- model_name: tcpMssAdjustment
7474
data_path: '0'
75-
response_data_path: response.0.tcpMssAdjustment
75+
response_data_path: tcpMssAdjustment
7676
type: Int64
7777
min_int: 500
7878
max_int: 1440
@@ -81,28 +81,28 @@ attributes:
8181
- model_name: localIpAddress
8282
data_path: '0'
8383
requires_replace: true
84-
response_data_path: response.0.localIpAddress
84+
response_data_path: localIpAddress
8585
type: String
8686
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
8787
example: "10.0.0.1/24"
8888
- model_name: remoteIpAddress
8989
data_path: '0'
9090
requires_replace: true
91-
response_data_path: response.0.remoteIpAddress
91+
response_data_path: remoteIpAddress
9292
type: String
9393
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
9494
example: "10.0.0.2/24"
9595
- model_name: localIpv6Address
9696
data_path: '0'
9797
requires_replace: true
98-
response_data_path: response.0.localIpv6Address
98+
response_data_path: localIpv6Address
9999
type: String
100100
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
101101
exclude_test: true
102102
- model_name: remoteIpv6Address
103103
data_path: '0'
104104
requires_replace: true
105-
response_data_path: response.0.remoteIpv6Address
105+
response_data_path: remoteIpv6Address
106106
type: String
107107
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
108108
exclude_test: true

gen/definitions/virtual_network_ip_pool.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,9 +130,9 @@ test_prerequisites: |
130130
depends_on = [catalystcenter_ip_pool.test]
131131
}
132132
resource "catalystcenter_fabric_site" "test" {
133-
site_name_hierarchy = "Global/Area1"
134-
fabric_type = "FABRIC_SITE"
135-
depends_on = [catalystcenter_area.test]
133+
site_id = catalystcenter_area.test.id
134+
authentication_profile_name = "No Authentication"
135+
pub_sub_enabled = false
136136
}
137137
resource "catalystcenter_fabric_virtual_network" "test" {
138138
virtual_network_name = "SDA_VN1"

gen/definitions/virtual_network_to_fabric_site.yaml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,28 +14,31 @@ attributes:
1414
data_source_query: true
1515
description: Virtual Network Name, that is created at Global level
1616
example: SDA_VN1
17-
test_value: catalystcenter_fabric_virtual_network.test.virtual_network_name
17+
test_value: catalystcenter_fabric_virtual_network.test.id
1818
- model_name: siteNameHierarchy
1919
mandatory: true
2020
data_source_query: true
2121
type: String
2222
description: Path of SDA Fabric Site, e.g. `Global/Area1
2323
example: "Global/Area1"
24-
test_value: catalystcenter_fabric_site.test.site_name_hierarchy
24+
test_value: '"${catalystcenter_area.test.parent_name}/${catalystcenter_area.test.name}"'
2525
test_prerequisites: |
2626
resource "catalystcenter_area" "test" {
2727
name = "Area1"
2828
parent_name = "Global"
2929
}
3030
resource "catalystcenter_fabric_site" "test" {
31-
site_name_hierarchy = "Global/Area1"
32-
fabric_type = "FABRIC_SITE"
31+
site_id = catalystcenter_area.test.id
32+
authentication_profile_name = "No Authentication"
33+
pub_sub_enabled = false
3334
3435
depends_on = [catalystcenter_area.test]
3536
}
3637
resource "catalystcenter_fabric_virtual_network" "test" {
3738
virtual_network_name = "SDA_VN1"
3839
is_guest = false
3940
sg_names = ["Employees"]
41+
42+
depends_on = [catalystcenter_fabric_site.test]
4043
}
4144

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ require (
1212
github.com/hashicorp/terraform-plugin-log v0.9.0
1313
github.com/hashicorp/terraform-plugin-testing v1.9.0
1414
github.com/netascode/go-catalystcenter v0.1.5
15-
github.com/tidwall/gjson v1.17.1
15+
github.com/tidwall/gjson v1.17.3
1616
github.com/tidwall/sjson v1.2.5
1717
golang.org/x/tools v0.23.0
1818
gopkg.in/yaml.v3 v3.0.1

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,8 +190,8 @@ github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1F
190190
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
191191
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
192192
github.com/tidwall/gjson v1.14.2/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk=
193-
github.com/tidwall/gjson v1.17.1 h1:wlYEnwqAHgzmhNUFfw7Xalt2JzQvsMx2Se4PcoFCT/U=
194-
github.com/tidwall/gjson v1.17.1/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk=
193+
github.com/tidwall/gjson v1.17.3 h1:bwWLZU7icoKRG+C+0PNwIKC6FCJO/Q3p2pZvuP0jN94=
194+
github.com/tidwall/gjson v1.17.3/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk=
195195
github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA=
196196
github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM=
197197
github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU=

0 commit comments

Comments
 (0)