From c72a612b44203c39dee4ed7fbf1082f289a803af Mon Sep 17 00:00:00 2001 From: Paul Meyer Date: Wed, 25 Sep 2019 17:30:58 +0000 Subject: [PATCH] Re-added tests for FillParamters --- builder/azure/common/client/config.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/builder/azure/common/client/config.go b/builder/azure/common/client/config.go index 96ca8c651..9a4a736e8 100644 --- a/builder/azure/common/client/config.go +++ b/builder/azure/common/client/config.go @@ -280,14 +280,6 @@ func (c *Config) FillParameters() error { c.SubscriptionID = subscriptionID } - if c.TenantID == "" { - tenantID, err := common.FindTenantID(*c.CloudEnvironment, c.SubscriptionID) - if err != nil { - return err - } - c.TenantID = tenantID - } - if c.CloudEnvironment == nil { err := c.setCloudEnvironment() if err != nil { @@ -295,6 +287,14 @@ func (c *Config) FillParameters() error { } } + if c.TenantID == "" { + tenantID, err := findTenantID(*c.CloudEnvironment, c.SubscriptionID) + if err != nil { + return err + } + c.TenantID = tenantID + } + return nil }