Azure / Azure/azure-powershell

Give Invoke-AzResourceAction powershell cmdlet a synchronous mode

Open
#10,316 8 comments 4 reactions 3 assignees Claimed by @ifeoluwaokunoren View on GitHub
act-identity-squad ARM - Core ARM - Core Triaged customer-reported feature-request Service Attention
Dominant language
C#
Stars
4.8k
Forks
4.3k
Avg merge
3d 14h
Merged PRs (30d)
54

Description

## Description of the new feature

Invoke-AzResourceAction, Powershell cmdlet, https://docs.microsoft.com/en-us/powershell/module/az.resources/invoke-azresourceaction?view=azps-2.8.0, currently runs asynchronously. It returns immediately but it is still working on the operation. The user must poll for a resource to be created and then check the provisioningstatus of that resource. The Azure CLI runs the comparative command synchronously, so it pauses until it is done. Could you at least create a parameter for Invoke-AzResourceAction so that it would run synchronously.

## Proposed implementation details (optional)
In other cases for async/sync operation you have -NoWait flag to trigger async so for consistency, lacking that flag should be the sync default. However, it now runs as async, so for the least breakage, you may want to add a -Wait flag.

You can no doubt implement this exactly as the CLI does.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.