added authorization to dns zones client (#428)

This commit is contained in:
Andy Wiens 2017-09-25 20:57:58 +01:00 committed by xenolf
parent 49b9503635
commit addee401b0

View file

@ -125,11 +125,10 @@ func (c *DNSProvider) getHostedZoneID(fqdn string) (string, error) {
} }
// Now we want to to Azure and get the zone. // Now we want to to Azure and get the zone.
dc := dns.NewZonesClient(c.subscriptionId)
rsc := dns.NewRecordSetsClient(c.subscriptionId)
spt, err := c.newServicePrincipalTokenFromCredentials(azure.PublicCloud.ResourceManagerEndpoint) spt, err := c.newServicePrincipalTokenFromCredentials(azure.PublicCloud.ResourceManagerEndpoint)
rsc.Authorizer = autorest.NewBearerAuthorizer(spt)
dc := dns.NewZonesClient(c.subscriptionId)
dc.Authorizer = autorest.NewBearerAuthorizer(spt)
zone, err := dc.Get(c.resourceGroup, acme.UnFqdn(authZone)) zone, err := dc.Get(c.resourceGroup, acme.UnFqdn(authZone))