Skip to content

Commit e06d4ec

Browse files
authored
Merge pull request #1 from golgeek/ll/publiczones
Only return public zones
2 parents ad1d3c7 + b1cef1a commit e06d4ec

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

client.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,9 @@ func (p *Provider) getCloudDNSZone(zone string) (string, error) {
122122
zonesLister := p.service.ManagedZones.List(p.Project)
123123
err := zonesLister.Pages(context.Background(), func(response *dns.ManagedZonesListResponse) error {
124124
for _, zone := range response.ManagedZones {
125-
p.zoneMap[zone.DnsName] = zone.Name
125+
if zone.Visibility == "public" {
126+
p.zoneMap[zone.DnsName] = zone.Name
127+
}
126128
}
127129
return nil
128130
})

0 commit comments

Comments
 (0)