Skip to content

Need better async support for New-AzureRmResourceGroupDeployment #7145

Open
@KirkMunro

Description

@KirkMunro

I have an issue with New-AzureRmResourceGroupDeployment that I'm hoping someone can help me with. I use PowerShell in Azure Functions, where the maximum amount of time that a function can run is 10 minutes (5 by default, but extensible). In some of the scripts I run through Azure Functions, I invoke New-AzureRmResourceGroupDeployment, which may take a really long time depending on what is being deployed. By default this cmdlet blocks, waiting for the results to come back, but you can invoke it with -AsJob to run the deployment in the background and continue working. That sort of helps, and I realize that was added to provide better async support, however it's still not sufficient in this case because the Azure Function can still only run for 10 minutes before timing out, and the job will still block until the deployment completes.

What I would much rather see is a way to invoke New-AzureRmResourceGroupDeployment such that it supports either one or both of the following:

  • returns details (a web endpoint) immediately about where I can go check the deployment, without waiting for deployment results and without a background job
  • accepts a callback web endpoint that will be invoked by Azure once the deployment is complete (successful or not)

In cases where you want to kick off a (deployment) task that may be very long running, where you don't need to or want to (or you simply cannot due to timeouts) consume any compute resources until the task has completed, this would be a very welcome feature for New-AzureRmResourceGroupDeployment and any other cmdlets that launch tasks which may take a long time to complete inside of Azure without requiring the use of local compute resources other than to report when the task completes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    ARMAzureRM 6.xfeature-requestThis issue requires a new behavior in the product in order be resolved.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions