ORACLE: BUGFIX: Support accounts with > 50 zones (#3179)

Co-authored-by: Tom Limoncelli <tlimoncelli@stackoverflow.com>
This commit is contained in:
fabienmazieres 2024-10-29 13:25:17 +00:00 committed by GitHub
parent be25228cc8
commit 5fbbad14b6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -92,6 +92,22 @@ func (o *oracleProvider) ListZones() ([]string, error) {
for i, zone := range listResp.Items {
zones[i] = *zone.Name
}
for listResp.OpcNextPage != nil {
listResp, err = o.client.ListZones(ctx, dns.ListZonesRequest{
CompartmentId: &o.compartment,
Page: listResp.OpcNextPage,
})
if err != nil {
return nil, err
}
for _, zone := range listResp.Items {
zones = append(zones, *zone.Name)
}
}
return zones, nil
}