Share via


az stack group

Manage Deployment Stacks at resource group.

Commands

Name Description Type Status
az stack group create

Create or update a deployment stack at resource group scope.

Core GA
az stack group delete

Delete specified deployment stack from resource group scope.

Core GA
az stack group export

Export the template used to create the deployment stack from resource group scope.

Core GA
az stack group list

List all deployment stacks in resource group.

Core GA
az stack group show

Get specified deployment stack from resource group scope.

Core GA
az stack group validate

Validate a deployment stack at resource group scope.

Core GA

az stack group create

Create or update a deployment stack at resource group scope.

az stack group create --action-on-unmanage {deleteAll, deleteResources, detachAll}
                      --deny-settings-mode {denyDelete, denyWriteAndDelete, none}
                      --name
                      --resource-group
                      [--bse {false, true}]
                      [--cs]
                      [--deny-settings-excluded-actions]
                      [--deny-settings-excluded-principals]
                      [--description]
                      [--no-wait]
                      [--parameters]
                      [--query-string]
                      [--tags]
                      [--template-file]
                      [--template-spec]
                      [--template-uri]
                      [--yes]

Examples

Create a deployment stack using template file and delete resources on unmanage.

az stack group create --name StackName --resource-group ResourceGroup --action-on-unmanage deleteResources --template-file simpleTemplate.json --description description --deny-settings-mode None

Create a deployment stack with parameter file and detach all resources on unmanage.

az stack group create --name StackName --resource-group ResourceGroup --action-on-unmanage detachAll --template-file simpleTemplate.json --parameters simpleTemplateParams.json --description description --deny-settings-mode None

Create a deployment stack with template spec and delete all resources on unmanage.

az stack group create --name StackName --resource-group ResourceGroup --action-on-unmanage deleteAll --template-spec TemplateSpecResourceIDWithVersion --description description --deny-settings-mode None

Create a deployment stack using bicep file.

az stack group create --name StackName --resource-group ResourceGroup --template-file simple.bicep --description description --deny-settings-mode None --action-on-unmanage deleteResources

Create a deployment stack at a different subscription.

az stack group create --name StackName --resource-group ResourceGroup --template-file simpleTemplate.json --description description --subscription subscriptionId --deny-settings-mode None --action-on-unmanage deleteResources

Create a deployment stack using parameters from key/value pairs.

az stack group create --name StackName --template-file simpleTemplate.json --resource-group ResourceGroup --description description --parameters simpleTemplateParams.json value1=foo value2=bar --deny-settings-mode None --action-on-unmanage deleteResources

Create a deployment stack from a local template, using a parameter file, a remote parameter file, and selectively overriding key/value pairs.

az stack group create --name StackName --template-file azuredeploy.json --parameters @params.json --parameters https://mysite/params.json --parameters MyValue=This MyArray=@array.json --resource-group ResourceGroup --deny-settings-mode None --action-on-unmanage deleteResources

Create a deployment stack from a local template, using deny settings.

az stack group create --name StackName --resource-group ResourceGroup --template-file azuredeploy.json --deny-settings-mode denyDelete --deny-settings-excluded-actions Microsoft.Compute/virtualMachines/write --deny-settings-excluded-principals "test1 test2" --action-on-unmanage deleteResources

Create a deployment stack from a local template, apply deny setting to child scopes.

az stack group create --name StackName --resource-group ResourceGroup --template-file azuredeploy.json --deny-settings-mode denyDelete --deny-settings-excluded-actions Microsoft.Compute/virtualMachines/write --deny-settings-apply-to-child-scopes --action-on-unmanage deleteResources

Required Parameters

--action-on-unmanage --aou

Defines what happens to resources that are no longer managed after the stack is updated or deleted.

Accepted values: deleteAll, deleteResources, detachAll
--deny-settings-mode --dm

Define which operations are denied on resources managed by the stack.

Accepted values: denyDelete, denyWriteAndDelete, none
--name -n

The name of the deployment stack.

--resource-group -g

The resource group where the deployment stack will be created.

Optional Parameters

--bse --bypass-stack-out-of-sync-error

Flag to bypass service errors that indicate the stack resource list is not correctly synchronized.

Accepted values: false, true
Default value: False
--cs --deny-settings-apply-to-child-scopes

DenySettings will be applied to child scopes.

Default value: False
--deny-settings-excluded-actions --ea

List of role-based management operations that are excluded from the denySettings. Up to 200 actions are permitted.

--deny-settings-excluded-principals --ep

List of AAD principal IDs excluded from the lock. Up to 5 principals are permitted.

--description

The description of deployment stack.

--no-wait

Do not wait for the long-running operation to finish.

Default value: False
--parameters -p

Parameters may be supplied from a file using the @{path} syntax, a JSON string, or as <KEY=VALUE> pairs. Parameters are evaluated in order, so when a value is assigned twice, the latter value will be used. It is recommended that you supply your parameters file first, and then override selectively using KEY=VALUE syntax.

--query-string -q

The query string (a SAS token) to be used with the template-uri in the case of linked templates.

--tags

Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.

--template-file -f

A path to a template file or Bicep file in the file system.

--template-spec -s

The template spec resource id.

--template-uri -u

A uri to a remote template file.

--yes

Do not prompt for confirmation.

Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az stack group delete

Delete specified deployment stack from resource group scope.

az stack group delete --action-on-unmanage {deleteAll, deleteResources, detachAll}
                      [--bse {false, true}]
                      [--id]
                      [--name]
                      [--resource-group]
                      [--yes]

Examples

Delete stack by name.

az stack group delete --name StackName --resource-group ResourceGroup --action-on-unmanage deleteResources

Delete stack by stack resource id.

az stack group delete --id /subscriptions/111111111111/resourceGroups/ResourceGroup/providers/Microsoft.Resources/deploymentStacks/StackName --action-on-unmanage detachAll

Required Parameters

--action-on-unmanage --aou

Defines what happens to resources that are no longer managed after the stack is updated or deleted.

Accepted values: deleteAll, deleteResources, detachAll

Optional Parameters

--bse --bypass-stack-out-of-sync-error

Flag to bypass service errors that indicate the stack resource list is not correctly synchronized.

Accepted values: false, true
Default value: False
--id

The deployment stack resource id.

--name -n

The deployment stack name.

--resource-group -g

The resource group where the deployment stack exists.

--yes

Do not prompt for confirmation.

Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az stack group export

Export the template used to create the deployment stack from resource group scope.

az stack group export [--id]
                      [--name]
                      [--resource-group]

Examples

Export template by name.

az stack group export --name StackName --resource-group ResourceGroup

Export template by stack resource id.

az stack group export --id /subscriptions/111111111111/resourceGroups/ResourceGroup/providers/Microsoft.Resources/deploymentStacks/StackName

Optional Parameters

--id

The deployment stack resource id.

--name -n

The deployment stack name.

--resource-group -g

The resource group where the deployment stack exists.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az stack group list

List all deployment stacks in resource group.

az stack group list --resource-group

Examples

List all stacks in resource group

az stack group list --resource-group ResourceGroup

Required Parameters

--resource-group -g

The resource group where the deployment stack exists.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az stack group show

Get specified deployment stack from resource group scope.

az stack group show [--id]
                    [--name]
                    [--resource-group]

Examples

Get stack by name.

az stack group show --name StackName --resource-group ResourceGroup

Get stack by stack resource id.

az stack group show --id /subscriptions/111111111111/resourceGroups/ResourceGroup/providers/Microsoft.Resources/deploymentStacks/StackName

Optional Parameters

--id

The deployment stack resource id.

--name -n

The deployment stack name.

--resource-group -g

The resource group where the deployment stack exists.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az stack group validate

Validate a deployment stack at resource group scope.

az stack group validate --action-on-unmanage {deleteAll, deleteResources, detachAll}
                        --deny-settings-mode {denyDelete, denyWriteAndDelete, none}
                        --name
                        --resource-group
                        [--bse {false, true}]
                        [--cs]
                        [--deny-settings-excluded-actions]
                        [--deny-settings-excluded-principals]
                        [--description]
                        [--parameters]
                        [--query-string]
                        [--tags]
                        [--template-file]
                        [--template-spec]
                        [--template-uri]

Examples

Validate a deployment stack using template file and delete resources on unmanage.

az stack group validate --name StackName --resource-group ResourceGroup --action-on-unmanage deleteResources --template-file simpleTemplate.json --description description --deny-settings-mode None

Validate a deployment stack with parameter file and detach all resources on unmanage.

az stack group validate --name StackName --resource-group ResourceGroup --action-on-unmanage detachAll --template-file simpleTemplate.json --parameters simpleTemplateParams.json --description description --deny-settings-mode None

Validate a deployment stack with template spec and delete all resources on unmanage.

az stack group validate --name StackName --resource-group ResourceGroup --action-on-unmanage deleteAll --template-spec TemplateSpecResourceIDWithVersion --description description --deny-settings-mode None

Validate a deployment stack using bicep file.

az stack group validate --name StackName --resource-group ResourceGroup --template-file simple.bicep --description description --deny-settings-mode None --action-on-unmanage deleteResources

Validate a deployment stack at a different subscription.

az stack group validate --name StackName --resource-group ResourceGroup --template-file simpleTemplate.json --description description --subscription subscriptionId --deny-settings-mode None --action-on-unmanage deleteResources

Validate a deployment stack using parameters from key/value pairs.

az stack group validate --name StackName --template-file simpleTemplate.json --resource-group ResourceGroup --description description --parameters simpleTemplateParams.json value1=foo value2=bar --deny-settings-mode None --action-on-unmanage deleteResources

Validate a deployment stack from a local template, using a parameter file, a remote parameter file, and selectively overriding key/value pairs.

az stack group validate --name StackName --template-file azuredeploy.json --parameters @params.json --parameters https://mysite/params.json --parameters MyValue=This MyArray=@array.json --resource-group ResourceGroup --deny-settings-mode None --action-on-unmanage deleteResources

Validate a deployment stack from a local template, using deny settings.

az stack group validate --name StackName --resource-group ResourceGroup --template-file azuredeploy.json --deny-settings-mode denyDelete --deny-settings-excluded-actions Microsoft.Compute/virtualMachines/write --deny-settings-excluded-principals "test1 test2" --action-on-unmanage deleteResources

Validate a deployment stack from a local template, apply deny setting to child scopes.

az stack group validate --name StackName --resource-group ResourceGroup --template-file azuredeploy.json --deny-settings-mode denyDelete --deny-settings-excluded-actions Microsoft.Compute/virtualMachines/write --deny-settings-apply-to-child-scopes --action-on-unmanage deleteResources

Required Parameters

--action-on-unmanage --aou

Defines what happens to resources that are no longer managed after the stack is updated or deleted.

Accepted values: deleteAll, deleteResources, detachAll
--deny-settings-mode --dm

Define which operations are denied on resources managed by the stack.

Accepted values: denyDelete, denyWriteAndDelete, none
--name -n

The name of the deployment stack.

--resource-group -g

The resource group where the deployment stack will be created.

Optional Parameters

--bse --bypass-stack-out-of-sync-error

Flag to bypass service errors that indicate the stack resource list is not correctly synchronized.

Accepted values: false, true
Default value: False
--cs --deny-settings-apply-to-child-scopes

DenySettings will be applied to child scopes.

Default value: False
--deny-settings-excluded-actions --ea

List of role-based management operations that are excluded from the denySettings. Up to 200 actions are permitted.

--deny-settings-excluded-principals --ep

List of AAD principal IDs excluded from the lock. Up to 5 principals are permitted.

--description

The description of deployment stack.

--parameters -p

Parameters may be supplied from a file using the @{path} syntax, a JSON string, or as <KEY=VALUE> pairs. Parameters are evaluated in order, so when a value is assigned twice, the latter value will be used. It is recommended that you supply your parameters file first, and then override selectively using KEY=VALUE syntax.

--query-string -q

The query string (a SAS token) to be used with the template-uri in the case of linked templates.

--tags

Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.

--template-file -f

A path to a template file or Bicep file in the file system.

--template-spec -s

The template spec resource id.

--template-uri -u

A uri to a remote template file.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.