Skip to content
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

fix(ip_group_cidr): Fixed the position of the CIDR existence check #27103

Merged
merged 2 commits into from
Aug 20, 2024
Merged
Changes from 1 commit
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
9 changes: 5 additions & 4 deletions internal/services/network/ip_group_cidr_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,11 @@ func resourceIpGroupCidrRead(d *pluginsdk.ResourceData, meta interface{}) error
if resp.Model.Properties == nil {
return fmt.Errorf("retrieving %s: `properties` was nil", ipGroupId)
}
if !utils.SliceContainsValue(*resp.Model.Properties.IPAddresses, cidr) {
d.SetId("")
return nil
}
}

if !utils.SliceContainsValue(*resp.Model.Properties.IPAddresses, cidr) {
tiwood marked this conversation as resolved.
Show resolved Hide resolved
d.SetId("")
return nil
}

d.Set("ip_group_id", ipGroupId.ID())
Expand Down
Loading