Skip to content

Commit 96bd4cc

Browse files
committed
prevent nil pointer dereference
1 parent ab71407 commit 96bd4cc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

internal/services/rdb/instance.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -678,7 +678,7 @@ func ResourceRdbInstanceRead(ctx context.Context, d *schema.ResourceData, m inte
678678
opts := &ipam.GetResourcePrivateIPsOptions{
679679
ResourceID: &res.ID,
680680
ResourceType: &resourceType,
681-
PrivateNetworkID: &res.Endpoints[0].PrivateNetwork.PrivateNetworkID,
681+
PrivateNetworkID: &endpoint.PrivateNetwork.PrivateNetworkID,
682682
}
683683

684684
endpointPrivateIPs, err := ipam.GetResourcePrivateIPs(ctx, m, region, opts)

0 commit comments

Comments
 (0)