set remaining context timeouts to 2.5 hours
@@ -107,7 +107,7 @@ func NewAzureClientWithDeviceAuth(env azure.Environment, subscriptionID string)
}
client := &autorest.Client{
- PollingDuration: 1 * time.Hour,
+ PollingDuration: DefaultARMOperationTimeout,
}
deviceCode, err := adal.InitiateDeviceAuth(client, *oauthConfig, acsEngineClientID, env.ServiceManagementEndpoint)
@@ -304,19 +304,19 @@ func getClient(env azure.Environment, subscriptionID, tenantID string, armSpt *a
c.resourcesClient.PollingDelay = time.Second * 5
// Set permissive timeouts to accommodate long-running operations
- c.deploymentsClient.PollingDuration = time.Hour * 1
- c.deploymentOperationsClient.PollingDuration = time.Hour * 1
- c.applicationsClient.PollingDuration = time.Hour * 1
- c.authorizationClient.PollingDuration = time.Hour * 1
- c.disksClient.PollingDuration = time.Hour * 1
- c.groupsClient.PollingDuration = time.Hour * 1
- c.interfacesClient.PollingDuration = time.Hour * 1
- c.providersClient.PollingDuration = time.Hour * 1
- c.resourcesClient.PollingDuration = time.Hour * 1
- c.storageAccountsClient.PollingDuration = time.Hour * 1
- c.virtualMachineScaleSetsClient.PollingDuration = time.Hour * 1
- c.virtualMachineScaleSetVMsClient.PollingDuration = time.Hour * 1
- c.virtualMachinesClient.PollingDuration = time.Hour * 1
+ c.deploymentsClient.PollingDuration = DefaultARMOperationTimeout
+ c.deploymentOperationsClient.PollingDuration = DefaultARMOperationTimeout
+ c.applicationsClient.PollingDuration = DefaultARMOperationTimeout
+ c.authorizationClient.PollingDuration = DefaultARMOperationTimeout
+ c.disksClient.PollingDuration = DefaultARMOperationTimeout
+ c.groupsClient.PollingDuration = DefaultARMOperationTimeout
+ c.interfacesClient.PollingDuration = DefaultARMOperationTimeout
+ c.providersClient.PollingDuration = DefaultARMOperationTimeout
+ c.resourcesClient.PollingDuration = DefaultARMOperationTimeout
+ c.storageAccountsClient.PollingDuration = DefaultARMOperationTimeout
+ c.virtualMachineScaleSetsClient.PollingDuration = DefaultARMOperationTimeout
+ c.virtualMachineScaleSetVMsClient.PollingDuration = DefaultARMOperationTimeout
+ c.virtualMachinesClient.PollingDuration = DefaultARMOperationTimeout
graphAuthorizer := autorest.NewBearerAuthorizer(graphSpt)
c.applicationsClient.Authorizer = graphAuthorizer
