瀏覽代碼

Use location flag in aci context creation only for group creation (default eastus). Once group has been created/selected, use group location.

Guillaume Tardif 5 年之前
父節點
當前提交
309069f545
共有 2 個文件被更改,包括 2 次插入4 次删除
  1. 1 4
      azure/context.go
  2. 1 0
      azure/context_test.go

+ 1 - 4
azure/context.go

@@ -77,10 +77,7 @@ func (helper contextCreateACIHelper) createContextData(ctx context.Context, opts
 		}
 	}
 
-	location := opts["aciLocation"]
-	if location == "" {
-		location = *group.Location
-	}
+	location := *group.Location
 
 	description := fmt.Sprintf("%s@%s", *group.Name, location)
 	if opts["description"] != "" {

+ 1 - 0
azure/context_test.go

@@ -179,6 +179,7 @@ func options(subscriptionID string, resourceGroupName string) map[string]string
 	return map[string]string{
 		"aciSubscriptionID": subscriptionID,
 		"aciResourceGroup":  resourceGroupName,
+		"aciLocation":       "eastus",
 	}
 }