Skip to content

Commit e0f439e

Browse files
tmp2
1 parent cfa963b commit e0f439e

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

gen/definitions/fabric_ewlc.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@ attributes:
2323
description: Fabric Site ID
2424
- model_name: id
2525
tf_name: network_device_id
26+
query_param_name: networkDeviceId
2627
type: String
28+
query_param: true
2729
id: true
2830
description: Network Device ID of the wireless capable switch
2931
example: 12345678-1234-1234-1234-123456789012

internal/provider/resource_catalystcenter_fabric_ewlc.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ func (r *FabricEWLCResource) Read(ctx context.Context, req resource.ReadRequest,
168168
tflog.Debug(ctx, fmt.Sprintf("%s: Beginning Read", state.Id.String()))
169169

170170
params := ""
171-
params += "/" + url.QueryEscape(state.Id.ValueString())
171+
params += "?fabricId=" + url.QueryEscape(state.FabricId.ValueString()) + "&networkDeviceId=" + url.QueryEscape(state.NetworkDeviceId.ValueString())
172172
res, err := r.client.Get("/dna/intent/api/v1/sda/fabricDevices" + params)
173173
if err != nil && (strings.Contains(err.Error(), "StatusCode 404") || strings.Contains(err.Error(), "StatusCode 406") || strings.Contains(err.Error(), "StatusCode 500") || strings.Contains(err.Error(), "StatusCode 400")) {
174174
resp.State.RemoveResource(ctx)

0 commit comments

Comments
 (0)