Use fqdn to get zone in gcloud Present/CleanUp (#861)

This commit is contained in:
Matthew Horan 2019-04-27 10:15:31 -04:00 committed by Ludovic Fernandez
parent f0cfdff395
commit 62e3f4fc01

View file

@ -156,7 +156,7 @@ func NewDNSProviderConfig(config *Config) (*DNSProvider, error) {
func (d *DNSProvider) Present(domain, token, keyAuth string) error {
fqdn, value := dns01.GetRecord(domain, keyAuth)
zone, err := d.getHostedZone(domain)
zone, err := d.getHostedZone(fqdn)
if err != nil {
return fmt.Errorf("googlecloud: %v", err)
}
@ -264,7 +264,7 @@ func (d *DNSProvider) applyChanges(zone string, change *dns.Change) error {
func (d *DNSProvider) CleanUp(domain, token, keyAuth string) error {
fqdn, _ := dns01.GetRecord(domain, keyAuth)
zone, err := d.getHostedZone(domain)
zone, err := d.getHostedZone(fqdn)
if err != nil {
return fmt.Errorf("googlecloud: %v", err)
}