Skip to content

Commit

Permalink
Fix issue with security group name in anycast_gateway (#180)
Browse files Browse the repository at this point in the history
  • Loading branch information
kuba-mazurkiewicz authored Feb 27, 2025
1 parent 173ec2e commit f26fab2
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 3 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.20 (unreleased)

- Fix issue with security group name in `catalystcenter_anycast_gateway` resource, [link](https://github.com/CiscoDevNet/terraform-provider-catalystcenter/issues/179)
- Add `catalystcenter_banner_settings` resource and data source
- Add `catalystcenter_dhcp_settings` resource and data source
- Add `catalystcenter_dns_settings` resource and data source
Expand Down
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.20 (unreleased)

- Fix issue with security group name in `catalystcenter_anycast_gateway` resource, [link](https://github.com/CiscoDevNet/terraform-provider-catalystcenter/issues/179)
- Add `catalystcenter_banner_settings` resource and data source
- Add `catalystcenter_dhcp_settings` resource and data source
- Add `catalystcenter_dns_settings` resource and data source
Expand Down
2 changes: 1 addition & 1 deletion gen/definitions/anycast_gateway.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ attributes:
exclude_test: true
- model_name: securityGroupName
data_path: '0'
response_data_path: response.0.securityGroupNames
response_data_path: response.0.securityGroupName
type: String
description: Name of the associated Security Group (not applicable to INFRA_VN)
exclude_test: true
Expand Down
4 changes: 2 additions & 2 deletions internal/provider/model_catalystcenter_anycast_gateway.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ func (data *AnycastGateway) fromBody(ctx context.Context, res gjson.Result) {
} else {
data.PoolType = types.StringNull()
}
if value := res.Get("response.0.securityGroupNames"); value.Exists() {
if value := res.Get("response.0.securityGroupName"); value.Exists() {
data.SecurityGroupName = types.StringValue(value.String())
} else {
data.SecurityGroupName = types.StringNull()
Expand Down Expand Up @@ -262,7 +262,7 @@ func (data *AnycastGateway) updateFromBody(ctx context.Context, res gjson.Result
} else {
data.PoolType = types.StringNull()
}
if value := res.Get("response.0.securityGroupNames"); value.Exists() && !data.SecurityGroupName.IsNull() {
if value := res.Get("response.0.securityGroupName"); value.Exists() && !data.SecurityGroupName.IsNull() {
data.SecurityGroupName = types.StringValue(value.String())
} else {
data.SecurityGroupName = types.StringNull()
Expand Down
1 change: 1 addition & 0 deletions templates/guides/changelog.md.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ description: |-

## 0.1.20 (unreleased)

- Fix issue with security group name in `catalystcenter_anycast_gateway` resource, [link](https://github.com/CiscoDevNet/terraform-provider-catalystcenter/issues/179)
- Add `catalystcenter_banner_settings` resource and data source
- Add `catalystcenter_dhcp_settings` resource and data source
- Add `catalystcenter_dns_settings` resource and data source
Expand Down

0 comments on commit f26fab2

Please sign in to comment.