Skip to content

Commit

Permalink
Fix issue CiscoDevNet#146 in catalystcenter_fabric_l3_handoff_ip_tran…
Browse files Browse the repository at this point in the history
…sit resource
  • Loading branch information
kuba-mazurkiewicz committed Nov 12, 2024
1 parent 72c56e9 commit 0dd2c84
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.1.15 (unreleased)

- Fix issue in `catalystcenter_fabric_l3_handoff_ip_transit` resource, [link](https://github.com/CiscoDevNet/terraform-provider-catalystcenter/issues/146)

## 0.1.14

- Modify `catalystcenter_deploy_template` resource to support `resource_params`
Expand Down
4 changes: 4 additions & 0 deletions docs/guides/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ description: |-

# Changelog

## 0.1.15 (unreleased)

- Fix issue in `catalystcenter_fabric_l3_handoff_ip_transit` resource, [link](https://github.com/CiscoDevNet/terraform-provider-catalystcenter/issues/146)

## 0.1.14

- Modify `catalystcenter_deploy_template` resource to support `resource_params`
Expand Down
2 changes: 1 addition & 1 deletion gen/definitions/fabric_l3_handoff_ip_transit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,13 @@ attributes:
- model_name: virtualNetworkName
data_path: '0'
requires_replace: true
match_id: true
response_data_path: virtualNetworkName
mandatory: true
type: String
description: Name of the virtual network associated with this fabric site
example: SDA_VN1
- model_name: vlanId
match_id: true
data_path: '0'
requires_replace: true
response_data_path: vlanId
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import (
"context"
"fmt"
"net/url"
"strconv"
"strings"

"github.com/CiscoDevNet/terraform-provider-catalystcenter/internal/provider/helpers"
Expand Down Expand Up @@ -198,7 +199,7 @@ func (r *FabricL3HandoffIPTransitResource) Create(ctx context.Context, req resou
resp.Diagnostics.AddError("Client Error", fmt.Sprintf("Failed to retrieve object (GET), got error: %s, %s", err, res.String()))
return
}
plan.Id = types.StringValue(res.Get("response.#(virtualNetworkName==\"" + plan.VirtualNetworkName.ValueString() + "\").id").String())
plan.Id = types.StringValue(res.Get("response.#(vlanId==\"" + strconv.FormatInt(plan.VlanId.ValueInt64(), 10) + "\").id").String())

tflog.Debug(ctx, fmt.Sprintf("%s: Create finished successfully", plan.Id.ValueString()))

Expand Down
4 changes: 4 additions & 0 deletions templates/guides/changelog.md.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ description: |-

# Changelog

## 0.1.15 (unreleased)

- Fix issue in `catalystcenter_fabric_l3_handoff_ip_transit` resource, [link](https://github.com/CiscoDevNet/terraform-provider-catalystcenter/issues/146)

## 0.1.14

- Modify `catalystcenter_deploy_template` resource to support `resource_params`
Expand Down

0 comments on commit 0dd2c84

Please sign in to comment.