Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Remarks
For Bicep, consider using modules instead of this resource type.
Bicep resource definition
The deployments resource type can be deployed with operations that target:
For a list of changed properties in each API version, see change log.
Resource format
To create a Microsoft.Resources/deployments resource, add the following Bicep to your template.
resource symbolicname 'Microsoft.Resources/deployments@2016-02-01' = {
scope: resourceSymbolicName or scope
name: 'string'
properties: {
debugSetting: {
detailLevel: 'string'
}
mode: 'string'
parameters: any(...)
parametersLink: {
contentVersion: 'string'
uri: 'string'
}
template: any(...)
templateLink: {
contentVersion: 'string'
uri: 'string'
}
}
}
Property Values
Microsoft.Resources/deployments
| Name | Description | Value |
|---|---|---|
| name | The resource name | string (required) |
| properties | The deployment properties. | DeploymentPropertiesOrDeploymentPropertiesExtended |
| scope | Use when creating a resource at a scope that is different than the deployment scope. | Set this property to the symbolic name of a resource to apply the extension resource. |
DebugSetting
| Name | Description | Value |
|---|---|---|
| detailLevel | The debug detail level. | string |
DeploymentPropertiesOrDeploymentPropertiesExtended
| Name | Description | Value |
|---|---|---|
| debugSetting | The debug setting of the deployment. | DebugSetting |
| mode | The deployment mode. | 'Complete' 'Incremental' (required) |
| parameters | Deployment parameters. It can be a JObject or a well formed JSON string. Use only one of Parameters or ParametersLink. | any |
| parametersLink | The parameters URI. Use only one of Parameters or ParametersLink. | ParametersLink |
| template | The template content. It can be a JObject or a well formed JSON string. Use only one of Template or TemplateLink. | any |
| templateLink | The template URI. Use only one of Template or TemplateLink. | TemplateLink |
ParametersLink
| Name | Description | Value |
|---|---|---|
| contentVersion | If included it must match the ContentVersion in the template. | string |
| uri | URI referencing the template. | string (required) |
TemplateLink
| Name | Description | Value |
|---|---|---|
| contentVersion | If included it must match the ContentVersion in the template. | string |
| uri | URI referencing the template. | string (required) |
ARM template resource definition
The deployments resource type can be deployed with operations that target:
For a list of changed properties in each API version, see change log.
Resource format
To create a Microsoft.Resources/deployments resource, add the following JSON to your template.
{
"type": "Microsoft.Resources/deployments",
"apiVersion": "2016-02-01",
"name": "string",
"properties": {
"debugSetting": {
"detailLevel": "string"
},
"mode": "string",
"parameters": {},
"parametersLink": {
"contentVersion": "string",
"uri": "string"
},
"template": {},
"templateLink": {
"contentVersion": "string",
"uri": "string"
}
}
}
Property Values
Microsoft.Resources/deployments
| Name | Description | Value |
|---|---|---|
| apiVersion | The api version | '2016-02-01' |
| name | The resource name | string (required) |
| properties | The deployment properties. | DeploymentPropertiesOrDeploymentPropertiesExtended |
| type | The resource type | 'Microsoft.Resources/deployments' |
DebugSetting
| Name | Description | Value |
|---|---|---|
| detailLevel | The debug detail level. | string |
DeploymentPropertiesOrDeploymentPropertiesExtended
| Name | Description | Value |
|---|---|---|
| debugSetting | The debug setting of the deployment. | DebugSetting |
| mode | The deployment mode. | 'Complete' 'Incremental' (required) |
| parameters | Deployment parameters. It can be a JObject or a well formed JSON string. Use only one of Parameters or ParametersLink. | any |
| parametersLink | The parameters URI. Use only one of Parameters or ParametersLink. | ParametersLink |
| template | The template content. It can be a JObject or a well formed JSON string. Use only one of Template or TemplateLink. | any |
| templateLink | The template URI. Use only one of Template or TemplateLink. | TemplateLink |
ParametersLink
| Name | Description | Value |
|---|---|---|
| contentVersion | If included it must match the ContentVersion in the template. | string |
| uri | URI referencing the template. | string (required) |
TemplateLink
| Name | Description | Value |
|---|---|---|
| contentVersion | If included it must match the ContentVersion in the template. | string |
| uri | URI referencing the template. | string (required) |
Usage Examples
Terraform (AzAPI provider) resource definition
The deployments resource type can be deployed with operations that target:
For a list of changed properties in each API version, see change log.
Resource format
To create a Microsoft.Resources/deployments resource, add the following Terraform to your template.
resource "azapi_resource" "symbolicname" {
type = "Microsoft.Resources/deployments@2016-02-01"
name = "string"
parent_id = "string"
body = {
properties = {
debugSetting = {
detailLevel = "string"
}
mode = "string"
parameters = ?
parametersLink = {
contentVersion = "string"
uri = "string"
}
template = ?
templateLink = {
contentVersion = "string"
uri = "string"
}
}
}
}
Property Values
Microsoft.Resources/deployments
| Name | Description | Value |
|---|---|---|
| name | The resource name | string (required) |
| parent_id | The ID of the resource to apply this extension resource to. | string (required) |
| properties | The deployment properties. | DeploymentPropertiesOrDeploymentPropertiesExtended |
| type | The resource type | "Microsoft.Resources/deployments@2016-02-01" |
DebugSetting
| Name | Description | Value |
|---|---|---|
| detailLevel | The debug detail level. | string |
DeploymentPropertiesOrDeploymentPropertiesExtended
| Name | Description | Value |
|---|---|---|
| debugSetting | The debug setting of the deployment. | DebugSetting |
| mode | The deployment mode. | 'Complete' 'Incremental' (required) |
| parameters | Deployment parameters. It can be a JObject or a well formed JSON string. Use only one of Parameters or ParametersLink. | any |
| parametersLink | The parameters URI. Use only one of Parameters or ParametersLink. | ParametersLink |
| template | The template content. It can be a JObject or a well formed JSON string. Use only one of Template or TemplateLink. | any |
| templateLink | The template URI. Use only one of Template or TemplateLink. | TemplateLink |
ParametersLink
| Name | Description | Value |
|---|---|---|
| contentVersion | If included it must match the ContentVersion in the template. | string |
| uri | URI referencing the template. | string (required) |
TemplateLink
| Name | Description | Value |
|---|---|---|
| contentVersion | If included it must match the ContentVersion in the template. | string |
| uri | URI referencing the template. | string (required) |
Usage Examples
Terraform Samples
A basic example of deploying Template Deployment.
terraform {
required_providers {
azapi = {
source = "Azure/azapi"
}
}
}
provider "azapi" {
skip_provider_registration = false
}
variable "resource_name" {
type = string
default = "acctest0001"
}
variable "location" {
type = string
default = "westeurope"
}
resource "azapi_resource" "resourceGroup" {
type = "Microsoft.Resources/resourceGroups@2020-06-01"
name = var.resource_name
location = var.location
}
resource "azapi_resource" "deployment" {
type = "Microsoft.Resources/deployments@2020-06-01"
parent_id = azapi_resource.resourceGroup.id
name = var.resource_name
body = {
properties = {
mode = "Complete"
template = {
"$schema" = "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#"
contentVersion = "1.0.0.0"
parameters = {
storageAccountType = {
allowedValues = [
"Standard_LRS",
"Standard_GRS",
"Standard_ZRS",
]
defaultValue = "Standard_LRS"
metadata = {
description = "Storage Account type"
}
type = "string"
}
}
resources = [
{
apiVersion = "[variables('apiVersion')]"
location = "[variables('location')]"
name = "[variables('storageAccountName')]"
properties = {
accountType = "[parameters('storageAccountType')]"
}
type = "Microsoft.Storage/storageAccounts"
},
{
apiVersion = "[variables('apiVersion')]"
location = "[variables('location')]"
name = "[variables('publicIPAddressName')]"
properties = {
dnsSettings = {
domainNameLabel = "[variables('dnsLabelPrefix')]"
}
publicIPAllocationMethod = "[variables('publicIPAddressType')]"
}
type = "Microsoft.Network/publicIPAddresses"
},
]
variables = {
apiVersion = "2015-06-15"
dnsLabelPrefix = "[concat('terraform-tdacctest', uniquestring(resourceGroup().id))]"
location = "[resourceGroup().location]"
publicIPAddressName = "[concat('myPublicIp', uniquestring(resourceGroup().id))]"
publicIPAddressType = "Dynamic"
storageAccountName = "[concat(uniquestring(resourceGroup().id), 'storage')]"
}
}
}
}
schema_validation_enabled = false
response_export_values = ["*"]
}