Microsoft.Resources deploymentScripts
Bicep resource definition
The deploymentScripts resource type can be deployed with operations that target:
- Resource groups - See resource group deployment commands
For a list of changed properties in each API version, see change log.
Remarks
To learn about executing scripts during deployment, see Use deployment scripts in Bicep or Use deployment scripts in ARM templates.
Resource format
To create a Microsoft.Resources/deploymentScripts resource, add the following Bicep to your template.
resource symbolicname 'Microsoft.Resources/deploymentScripts@2023-08-01' = {
name: 'string'
location: 'string'
tags: {
tagName1: 'tagValue1'
tagName2: 'tagValue2'
}
kind: 'string'
identity: {
type: 'UserAssigned'
userAssignedIdentities: {
{customized property}: {}
}
}
// For remaining properties, see deploymentScripts objects
}
deploymentScripts objects
Set the kind property to specify the type of object.
For AzureCLI, use:
kind: 'AzureCLI'
properties: {
arguments: 'string'
azCliVersion: 'string'
cleanupPreference: 'string'
containerSettings: {
containerGroupName: 'string'
subnetIds: [
{
id: 'string'
name: 'string'
}
]
}
environmentVariables: [
{
name: 'string'
secureValue: 'string'
value: 'string'
}
]
forceUpdateTag: 'string'
primaryScriptUri: 'string'
retentionInterval: 'string'
scriptContent: 'string'
storageAccountSettings: {
storageAccountKey: 'string'
storageAccountName: 'string'
}
supportingScriptUris: [
'string'
]
timeout: 'string'
}
For AzurePowerShell, use:
kind: 'AzurePowerShell'
properties: {
arguments: 'string'
azPowerShellVersion: 'string'
cleanupPreference: 'string'
containerSettings: {
containerGroupName: 'string'
subnetIds: [
{
id: 'string'
name: 'string'
}
]
}
environmentVariables: [
{
name: 'string'
secureValue: 'string'
value: 'string'
}
]
forceUpdateTag: 'string'
primaryScriptUri: 'string'
retentionInterval: 'string'
scriptContent: 'string'
storageAccountSettings: {
storageAccountKey: 'string'
storageAccountName: 'string'
}
supportingScriptUris: [
'string'
]
timeout: 'string'
}
Property values
deploymentScripts
Name | Description | Value |
---|---|---|
name | The resource name | string (required) |
location | The location of the ACI and the storage account for the deployment script. | string (required) |
tags | Resource tags. | Dictionary of tag names and values. See Tags in templates |
kind | Set the object type | AzureCLI AzurePowerShell (required) |
identity | Optional property. Managed identity to be used for this deployment script. Currently, only user-assigned MSI is supported. | ManagedServiceIdentity |
AzureCliScript
Name | Description | Value |
---|---|---|
kind | Type of the script. | 'AzureCLI' (required) |
properties | Properties of the Azure CLI script object. | AzureCliScriptProperties (required) |
AzureCliScriptProperties
Name | Description | Value |
---|---|---|
arguments | Command line arguments to pass to the script. Arguments are separated by spaces. ex: -Name blue* -Location 'West US 2' | string |
azCliVersion | Azure CLI module version to be used. | string (required) |
cleanupPreference | The clean up preference when the script execution gets in a terminal state. Default setting is 'Always'. | 'Always' 'OnExpiration' 'OnSuccess' |
containerSettings | Container settings. | ContainerConfiguration |
environmentVariables | The environment variables to pass over to the script. | EnvironmentVariable[] |
forceUpdateTag | Gets or sets how the deployment script should be forced to execute even if the script resource has not changed. Can be current time stamp or a GUID. | string |
primaryScriptUri | Uri for the script. This is the entry point for the external script. | string |
retentionInterval | Interval for which the service retains the script resource after it reaches a terminal state. Resource will be deleted when this duration expires. Duration is based on ISO 8601 pattern (for example P1D means one day). | string (required) |
scriptContent | Script body. | string |
storageAccountSettings | Storage Account settings. | StorageAccountConfiguration |
supportingScriptUris | Supporting files for the external script. | string[] |
timeout | Maximum allowed script execution time specified in ISO 8601 format. Default value is P1D | string |
ContainerConfiguration
Name | Description | Value |
---|---|---|
containerGroupName | Container group name, if not specified then the name will get auto-generated. Not specifying a 'containerGroupName' indicates the system to generate a unique name which might end up flagging an Azure Policy as non-compliant. Use 'containerGroupName' when you have an Azure Policy that expects a specific naming convention or when you want to fully control the name. 'containerGroupName' property must be between 1 and 63 characters long, must contain only lowercase letters, numbers, and dashes and it cannot start or end with a dash and consecutive dashes are not allowed. To specify a 'containerGroupName', add the following object to properties: { "containerSettings": { "containerGroupName": "contoso-container" } }. If you do not want to specify a 'containerGroupName' then do not add 'containerSettings' property. | string Constraints: Min length = 1 Max length = 63 |
subnetIds | The subnet resource IDs for a container group. | ContainerGroupSubnetId[] |
ContainerGroupSubnetId
Name | Description | Value |
---|---|---|
id | Resource ID of subnet. | string (required) |
name | Friendly name for the subnet. | string |
EnvironmentVariable
Name | Description | Value |
---|---|---|
name | The name of the environment variable. | string (required) |
secureValue | The value of the secure environment variable. | string Constraints: Sensitive value. Pass in as a secure parameter. |
value | The value of the environment variable. | string |
StorageAccountConfiguration
Name | Description | Value |
---|---|---|
storageAccountKey | The storage account access key. | string Constraints: Sensitive value. Pass in as a secure parameter. |
storageAccountName | The storage account name. | string |
AzurePowerShellScript
Name | Description | Value |
---|---|---|
kind | Type of the script. | 'AzurePowerShell' (required) |
properties | Properties of the Azure PowerShell script object. | AzurePowerShellScriptProperties (required) |
AzurePowerShellScriptProperties
Name | Description | Value |
---|---|---|
arguments | Command line arguments to pass to the script. Arguments are separated by spaces. ex: -Name blue* -Location 'West US 2' | string |
azPowerShellVersion | Azure PowerShell module version to be used. | string (required) |
cleanupPreference | The clean up preference when the script execution gets in a terminal state. Default setting is 'Always'. | 'Always' 'OnExpiration' 'OnSuccess' |
containerSettings | Container settings. | ContainerConfiguration |
environmentVariables | The environment variables to pass over to the script. | EnvironmentVariable[] |
forceUpdateTag | Gets or sets how the deployment script should be forced to execute even if the script resource has not changed. Can be current time stamp or a GUID. | string |
primaryScriptUri | Uri for the script. This is the entry point for the external script. | string |
retentionInterval | Interval for which the service retains the script resource after it reaches a terminal state. Resource will be deleted when this duration expires. Duration is based on ISO 8601 pattern (for example P1D means one day). | string (required) |
scriptContent | Script body. | string |
storageAccountSettings | Storage Account settings. | StorageAccountConfiguration |
supportingScriptUris | Supporting files for the external script. | string[] |
timeout | Maximum allowed script execution time specified in ISO 8601 format. Default value is P1D | string |
ManagedServiceIdentity
Name | Description | Value |
---|---|---|
type | Type of the managed identity. | 'UserAssigned' |
userAssignedIdentities | The list of user-assigned managed identities associated with the resource. Key is the Azure resource Id of the managed identity. | ManagedServiceIdentityUserAssignedIdentities |
ManagedServiceIdentityUserAssignedIdentities
Name | Description | Value |
---|---|---|
{customized property} | UserAssignedIdentity |
UserAssignedIdentity
This object doesn't contain any properties to set during deployment. All properties are ReadOnly.
Quickstart templates
The following quickstart templates deploy this resource type.
Template | Description |
---|---|
min.io Azure Gateway |
Fully private min.io Azure Gateway deployment to provide an S3 compliant storage API backed by blob storage |
Create a WordPress site |
This template creates a WordPress site on Container Instance |
Azure Image Builder with Azure Windows Baseline |
Creates an Azure Image Builder environment and builds a Windows Server image with the latest Windows Updates and Azure Windows Baseline applied. |
Import VHD Blobs from a ZIP Archive URL |
Deploying Virtual Machines based on specialized disk images requires to import VHD files into a Storage Account. In the case there are multiple VHD files compressed in a single ZIP and you got the URL to fetch the ZIP archive, this ARM template will ease the job: Download, Extract and Import into an existing Storage Account Blob Container. |
Copy a file from a uri to a blob storage container |
This module downloads a file from a uri and copies it to an Azure storageAccount blob container. The storageAccount must already exist and the source file must already be staged to the uri. |
Creates a Container App and Environment with Registry |
Create a Container App Environment with a basic Container App from an Azure Container Registry. It also deploys a Log Analytics Workspace to store logs. |
Creates a Dapr pub-sub servicebus app using Container Apps |
Create a Dapr pub-sub servicebus app using Container Apps. |
Deploy a simple Azure Spring Apps microservice application |
This template deploys a simple Azure Spring Apps microservice application to run on Azure. |
Front Door Standard/Premium with static website origin |
This template creates a Front Door Standard/Premium and an Azure Storage static website, and configured Front Door to send traffic to the static website. |
Create an on-demand SFTP Server with persistent storage |
This template demonstrates an on-demand SFTP server using an Azure Container Instance (ACI). |
FinOps hub |
This template creates a new FinOps hub instance, including Data Lake storage and a Data Factory. |
Create a blob for the data factory copy data tool quickstart |
This template creates a blob storage and uploads a file for the copy data tool quickstart |
More is possible with Azure Data Factory - One click to try Azure Data Factory |
This template creates a data factory pipeline for a copy activity from Azure Blob into another Azure Blob |
Configure Dev Box service |
This template would create all Dev Box admin resources as per Dev Box quick start guide (https://zcusa.951200.xyz/azure/dev-box/quickstart-create-dev-box). You can view all resources created, or directly go to DevPortal.microsoft.com to create your first Dev Box. |
Azure Container Service (AKS) with Helm |
Deploy a managed cluster with Azure Container Service (AKS) with Helm |
Create an Azure Machine Learning Sweep job |
This template creates an Azure Machine Learning Sweep job for hyperparameter tuning. |
Testing environment for Azure Firewall Premium |
This template creates an Azure Firewall Premium and Firewall Policy with premium features such as Intrusion Inspection Detection (IDPS), TLS inspection and Web Category filtering |
Build container images with ACR Tasks |
This template uses DeploymentScript to orchestrate ACR to build your container image from code repo. |
Import Container Images into ACR |
This template leverages the Import ACR module from the bicep registry to import public container images into an Azure Container Registry. |
Create Application Gateway with Certificates |
This template shows how to generate Key Vault self-signed certificates, then reference from Application Gateway. |
Use a deployment script to create Azure AD objects |
This sample uses a deployment script to create objects in Azure Active Directory. |
Create a Deployment Script with complex inputs & outputs |
This template demonstrates best practices for passing and reading complex inputs, outputs and logs to an Az CLI Deployment Script |
Create a Deployment Script with complex inputs & outputs |
This template demonstrates best practices for passing and reading complex inputs, outputs and logs to an Az Powershell Deployment Script |
Create ssh-keys and store in KeyVault |
This template uses the deploymentScript resource to generate ssh keys and stores the private key in keyVault. |
Deploys a static website |
Deploys a static website with a backing storage account |
Function App on Linux Consumption Plan with Remote Build |
This template provisions a function app on a Linux Consumption plan and perform remote build during code deployment. The app runs on demand and you're billed per execution, with no standing resource committment. |
Create an Azure Virtual Network Manager and sample VNETs |
This template deploys an Azure Virtual Network Manager and sample virtual networks into the named resource group. It supports multiple connectivity topologies and network group membership types. |
ARM template resource definition
The deploymentScripts resource type can be deployed with operations that target:
- Resource groups - See resource group deployment commands
For a list of changed properties in each API version, see change log.
Remarks
To learn about executing scripts during deployment, see Use deployment scripts in Bicep or Use deployment scripts in ARM templates.
Resource format
To create a Microsoft.Resources/deploymentScripts resource, add the following JSON to your template.
{
"type": "Microsoft.Resources/deploymentScripts",
"apiVersion": "2023-08-01",
"name": "string",
"location": "string",
"tags": {
"tagName1": "tagValue1",
"tagName2": "tagValue2"
},
"kind": "string",
"identity": {
"type": "UserAssigned",
"userAssignedIdentities": {
"{customized property}": {}
}
},
// For remaining properties, see deploymentScripts objects
}
deploymentScripts objects
Set the kind property to specify the type of object.
For AzureCLI, use:
"kind": "AzureCLI",
"properties": {
"arguments": "string",
"azCliVersion": "string",
"cleanupPreference": "string",
"containerSettings": {
"containerGroupName": "string",
"subnetIds": [
{
"id": "string",
"name": "string"
}
]
},
"environmentVariables": [
{
"name": "string",
"secureValue": "string",
"value": "string"
}
],
"forceUpdateTag": "string",
"primaryScriptUri": "string",
"retentionInterval": "string",
"scriptContent": "string",
"storageAccountSettings": {
"storageAccountKey": "string",
"storageAccountName": "string"
},
"supportingScriptUris": [ "string" ],
"timeout": "string"
}
For AzurePowerShell, use:
"kind": "AzurePowerShell",
"properties": {
"arguments": "string",
"azPowerShellVersion": "string",
"cleanupPreference": "string",
"containerSettings": {
"containerGroupName": "string",
"subnetIds": [
{
"id": "string",
"name": "string"
}
]
},
"environmentVariables": [
{
"name": "string",
"secureValue": "string",
"value": "string"
}
],
"forceUpdateTag": "string",
"primaryScriptUri": "string",
"retentionInterval": "string",
"scriptContent": "string",
"storageAccountSettings": {
"storageAccountKey": "string",
"storageAccountName": "string"
},
"supportingScriptUris": [ "string" ],
"timeout": "string"
}
Property values
deploymentScripts
Name | Description | Value |
---|---|---|
type | The resource type | 'Microsoft.Resources/deploymentScripts' |
apiVersion | The resource api version | '2023-08-01' |
name | The resource name | string (required) |
location | The location of the ACI and the storage account for the deployment script. | string (required) |
tags | Resource tags. | Dictionary of tag names and values. See Tags in templates |
kind | Set the object type | AzureCLI AzurePowerShell (required) |
identity | Optional property. Managed identity to be used for this deployment script. Currently, only user-assigned MSI is supported. | ManagedServiceIdentity |
AzureCliScript
Name | Description | Value |
---|---|---|
kind | Type of the script. | 'AzureCLI' (required) |
properties | Properties of the Azure CLI script object. | AzureCliScriptProperties (required) |
AzureCliScriptProperties
Name | Description | Value |
---|---|---|
arguments | Command line arguments to pass to the script. Arguments are separated by spaces. ex: -Name blue* -Location 'West US 2' | string |
azCliVersion | Azure CLI module version to be used. | string (required) |
cleanupPreference | The clean up preference when the script execution gets in a terminal state. Default setting is 'Always'. | 'Always' 'OnExpiration' 'OnSuccess' |
containerSettings | Container settings. | ContainerConfiguration |
environmentVariables | The environment variables to pass over to the script. | EnvironmentVariable[] |
forceUpdateTag | Gets or sets how the deployment script should be forced to execute even if the script resource has not changed. Can be current time stamp or a GUID. | string |
primaryScriptUri | Uri for the script. This is the entry point for the external script. | string |
retentionInterval | Interval for which the service retains the script resource after it reaches a terminal state. Resource will be deleted when this duration expires. Duration is based on ISO 8601 pattern (for example P1D means one day). | string (required) |
scriptContent | Script body. | string |
storageAccountSettings | Storage Account settings. | StorageAccountConfiguration |
supportingScriptUris | Supporting files for the external script. | string[] |
timeout | Maximum allowed script execution time specified in ISO 8601 format. Default value is P1D | string |
ContainerConfiguration
Name | Description | Value |
---|---|---|
containerGroupName | Container group name, if not specified then the name will get auto-generated. Not specifying a 'containerGroupName' indicates the system to generate a unique name which might end up flagging an Azure Policy as non-compliant. Use 'containerGroupName' when you have an Azure Policy that expects a specific naming convention or when you want to fully control the name. 'containerGroupName' property must be between 1 and 63 characters long, must contain only lowercase letters, numbers, and dashes and it cannot start or end with a dash and consecutive dashes are not allowed. To specify a 'containerGroupName', add the following object to properties: { "containerSettings": { "containerGroupName": "contoso-container" } }. If you do not want to specify a 'containerGroupName' then do not add 'containerSettings' property. | string Constraints: Min length = 1 Max length = 63 |
subnetIds | The subnet resource IDs for a container group. | ContainerGroupSubnetId[] |
ContainerGroupSubnetId
Name | Description | Value |
---|---|---|
id | Resource ID of subnet. | string (required) |
name | Friendly name for the subnet. | string |
EnvironmentVariable
Name | Description | Value |
---|---|---|
name | The name of the environment variable. | string (required) |
secureValue | The value of the secure environment variable. | string Constraints: Sensitive value. Pass in as a secure parameter. |
value | The value of the environment variable. | string |
StorageAccountConfiguration
Name | Description | Value |
---|---|---|
storageAccountKey | The storage account access key. | string Constraints: Sensitive value. Pass in as a secure parameter. |
storageAccountName | The storage account name. | string |
AzurePowerShellScript
Name | Description | Value |
---|---|---|
kind | Type of the script. | 'AzurePowerShell' (required) |
properties | Properties of the Azure PowerShell script object. | AzurePowerShellScriptProperties (required) |
AzurePowerShellScriptProperties
Name | Description | Value |
---|---|---|
arguments | Command line arguments to pass to the script. Arguments are separated by spaces. ex: -Name blue* -Location 'West US 2' | string |
azPowerShellVersion | Azure PowerShell module version to be used. | string (required) |
cleanupPreference | The clean up preference when the script execution gets in a terminal state. Default setting is 'Always'. | 'Always' 'OnExpiration' 'OnSuccess' |
containerSettings | Container settings. | ContainerConfiguration |
environmentVariables | The environment variables to pass over to the script. | EnvironmentVariable[] |
forceUpdateTag | Gets or sets how the deployment script should be forced to execute even if the script resource has not changed. Can be current time stamp or a GUID. | string |
primaryScriptUri | Uri for the script. This is the entry point for the external script. | string |
retentionInterval | Interval for which the service retains the script resource after it reaches a terminal state. Resource will be deleted when this duration expires. Duration is based on ISO 8601 pattern (for example P1D means one day). | string (required) |
scriptContent | Script body. | string |
storageAccountSettings | Storage Account settings. | StorageAccountConfiguration |
supportingScriptUris | Supporting files for the external script. | string[] |
timeout | Maximum allowed script execution time specified in ISO 8601 format. Default value is P1D | string |
ManagedServiceIdentity
Name | Description | Value |
---|---|---|
type | Type of the managed identity. | 'UserAssigned' |
userAssignedIdentities | The list of user-assigned managed identities associated with the resource. Key is the Azure resource Id of the managed identity. | ManagedServiceIdentityUserAssignedIdentities |
ManagedServiceIdentityUserAssignedIdentities
Name | Description | Value |
---|---|---|
{customized property} | UserAssignedIdentity |
UserAssignedIdentity
This object doesn't contain any properties to set during deployment. All properties are ReadOnly.
Quickstart templates
The following quickstart templates deploy this resource type.
Template | Description |
---|---|
min.io Azure Gateway |
Fully private min.io Azure Gateway deployment to provide an S3 compliant storage API backed by blob storage |
Create a WordPress site |
This template creates a WordPress site on Container Instance |
Azure Image Builder with Azure Windows Baseline |
Creates an Azure Image Builder environment and builds a Windows Server image with the latest Windows Updates and Azure Windows Baseline applied. |
Import VHD Blobs from a ZIP Archive URL |
Deploying Virtual Machines based on specialized disk images requires to import VHD files into a Storage Account. In the case there are multiple VHD files compressed in a single ZIP and you got the URL to fetch the ZIP archive, this ARM template will ease the job: Download, Extract and Import into an existing Storage Account Blob Container. |
Copy a file from a uri to a blob storage container |
This module downloads a file from a uri and copies it to an Azure storageAccount blob container. The storageAccount must already exist and the source file must already be staged to the uri. |
Creates a Container App and Environment with Registry |
Create a Container App Environment with a basic Container App from an Azure Container Registry. It also deploys a Log Analytics Workspace to store logs. |
Creates a Dapr pub-sub servicebus app using Container Apps |
Create a Dapr pub-sub servicebus app using Container Apps. |
Deploy a simple Azure Spring Apps microservice application |
This template deploys a simple Azure Spring Apps microservice application to run on Azure. |
Front Door Standard/Premium with static website origin |
This template creates a Front Door Standard/Premium and an Azure Storage static website, and configured Front Door to send traffic to the static website. |
Create an on-demand SFTP Server with persistent storage |
This template demonstrates an on-demand SFTP server using an Azure Container Instance (ACI). |
FinOps hub |
This template creates a new FinOps hub instance, including Data Lake storage and a Data Factory. |
Create a blob for the data factory copy data tool quickstart |
This template creates a blob storage and uploads a file for the copy data tool quickstart |
More is possible with Azure Data Factory - One click to try Azure Data Factory |
This template creates a data factory pipeline for a copy activity from Azure Blob into another Azure Blob |
Configure Dev Box service |
This template would create all Dev Box admin resources as per Dev Box quick start guide (https://zcusa.951200.xyz/azure/dev-box/quickstart-create-dev-box). You can view all resources created, or directly go to DevPortal.microsoft.com to create your first Dev Box. |
Azure Container Service (AKS) with Helm |
Deploy a managed cluster with Azure Container Service (AKS) with Helm |
Create an Azure Machine Learning Sweep job |
This template creates an Azure Machine Learning Sweep job for hyperparameter tuning. |
Testing environment for Azure Firewall Premium |
This template creates an Azure Firewall Premium and Firewall Policy with premium features such as Intrusion Inspection Detection (IDPS), TLS inspection and Web Category filtering |
Build container images with ACR Tasks |
This template uses DeploymentScript to orchestrate ACR to build your container image from code repo. |
Import Container Images into ACR |
This template leverages the Import ACR module from the bicep registry to import public container images into an Azure Container Registry. |
Create Application Gateway with Certificates |
This template shows how to generate Key Vault self-signed certificates, then reference from Application Gateway. |
Use a deployment script to create Azure AD objects |
This sample uses a deployment script to create objects in Azure Active Directory. |
Create a Deployment Script with complex inputs & outputs |
This template demonstrates best practices for passing and reading complex inputs, outputs and logs to an Az CLI Deployment Script |
Create a Deployment Script with complex inputs & outputs |
This template demonstrates best practices for passing and reading complex inputs, outputs and logs to an Az Powershell Deployment Script |
Create ssh-keys and store in KeyVault |
This template uses the deploymentScript resource to generate ssh keys and stores the private key in keyVault. |
Deploys a static website |
Deploys a static website with a backing storage account |
Function App on Linux Consumption Plan with Remote Build |
This template provisions a function app on a Linux Consumption plan and perform remote build during code deployment. The app runs on demand and you're billed per execution, with no standing resource committment. |
Create an Azure Virtual Network Manager and sample VNETs |
This template deploys an Azure Virtual Network Manager and sample virtual networks into the named resource group. It supports multiple connectivity topologies and network group membership types. |
Terraform (AzAPI provider) resource definition
The deploymentScripts resource type can be deployed with operations that target:
- Resource groups
For a list of changed properties in each API version, see change log.
Resource format
To create a Microsoft.Resources/deploymentScripts resource, add the following Terraform to your template.
resource "azapi_resource" "symbolicname" {
type = "Microsoft.Resources/deploymentScripts@2023-08-01"
name = "string"
location = "string"
parent_id = "string"
tags = {
tagName1 = "tagValue1"
tagName2 = "tagValue2"
}
identity {
type = "UserAssigned"
identity_ids = []
}
// For remaining properties, see deploymentScripts objects
body = jsonencode({
kind = "string"
})
}
deploymentScripts objects
Set the kind property to specify the type of object.
For AzureCLI, use:
kind = "AzureCLI"
properties = {
arguments = "string"
azCliVersion = "string"
cleanupPreference = "string"
containerSettings = {
containerGroupName = "string"
subnetIds = [
{
id = "string"
name = "string"
}
]
}
environmentVariables = [
{
name = "string"
secureValue = "string"
value = "string"
}
]
forceUpdateTag = "string"
primaryScriptUri = "string"
retentionInterval = "string"
scriptContent = "string"
storageAccountSettings = {
storageAccountKey = "string"
storageAccountName = "string"
}
supportingScriptUris = [
"string"
]
timeout = "string"
}
For AzurePowerShell, use:
kind = "AzurePowerShell"
properties = {
arguments = "string"
azPowerShellVersion = "string"
cleanupPreference = "string"
containerSettings = {
containerGroupName = "string"
subnetIds = [
{
id = "string"
name = "string"
}
]
}
environmentVariables = [
{
name = "string"
secureValue = "string"
value = "string"
}
]
forceUpdateTag = "string"
primaryScriptUri = "string"
retentionInterval = "string"
scriptContent = "string"
storageAccountSettings = {
storageAccountKey = "string"
storageAccountName = "string"
}
supportingScriptUris = [
"string"
]
timeout = "string"
}
Property values
deploymentScripts
Name | Description | Value |
---|---|---|
type | The resource type | "Microsoft.Resources/deploymentScripts@2023-08-01" |
name | The resource name | string (required) |
location | The location of the ACI and the storage account for the deployment script. | string (required) |
parent_id | To deploy to a resource group, use the ID of that resource group. | string (required) |
tags | Resource tags. | Dictionary of tag names and values. |
kind | Set the object type | AzureCLI AzurePowerShell (required) |
identity | Optional property. Managed identity to be used for this deployment script. Currently, only user-assigned MSI is supported. | ManagedServiceIdentity |
AzureCliScript
Name | Description | Value |
---|---|---|
kind | Type of the script. | "AzureCLI" (required) |
properties | Properties of the Azure CLI script object. | AzureCliScriptProperties (required) |
AzureCliScriptProperties
Name | Description | Value |
---|---|---|
arguments | Command line arguments to pass to the script. Arguments are separated by spaces. ex: -Name blue* -Location 'West US 2' | string |
azCliVersion | Azure CLI module version to be used. | string (required) |
cleanupPreference | The clean up preference when the script execution gets in a terminal state. Default setting is 'Always'. | "Always" "OnExpiration" "OnSuccess" |
containerSettings | Container settings. | ContainerConfiguration |
environmentVariables | The environment variables to pass over to the script. | EnvironmentVariable[] |
forceUpdateTag | Gets or sets how the deployment script should be forced to execute even if the script resource has not changed. Can be current time stamp or a GUID. | string |
primaryScriptUri | Uri for the script. This is the entry point for the external script. | string |
retentionInterval | Interval for which the service retains the script resource after it reaches a terminal state. Resource will be deleted when this duration expires. Duration is based on ISO 8601 pattern (for example P1D means one day). | string (required) |
scriptContent | Script body. | string |
storageAccountSettings | Storage Account settings. | StorageAccountConfiguration |
supportingScriptUris | Supporting files for the external script. | string[] |
timeout | Maximum allowed script execution time specified in ISO 8601 format. Default value is P1D | string |
ContainerConfiguration
Name | Description | Value |
---|---|---|
containerGroupName | Container group name, if not specified then the name will get auto-generated. Not specifying a 'containerGroupName' indicates the system to generate a unique name which might end up flagging an Azure Policy as non-compliant. Use 'containerGroupName' when you have an Azure Policy that expects a specific naming convention or when you want to fully control the name. 'containerGroupName' property must be between 1 and 63 characters long, must contain only lowercase letters, numbers, and dashes and it cannot start or end with a dash and consecutive dashes are not allowed. To specify a 'containerGroupName', add the following object to properties: { "containerSettings": { "containerGroupName": "contoso-container" } }. If you do not want to specify a 'containerGroupName' then do not add 'containerSettings' property. | string Constraints: Min length = 1 Max length = 63 |
subnetIds | The subnet resource IDs for a container group. | ContainerGroupSubnetId[] |
ContainerGroupSubnetId
Name | Description | Value |
---|---|---|
id | Resource ID of subnet. | string (required) |
name | Friendly name for the subnet. | string |
EnvironmentVariable
Name | Description | Value |
---|---|---|
name | The name of the environment variable. | string (required) |
secureValue | The value of the secure environment variable. | string Constraints: Sensitive value. Pass in as a secure parameter. |
value | The value of the environment variable. | string |
StorageAccountConfiguration
Name | Description | Value |
---|---|---|
storageAccountKey | The storage account access key. | string Constraints: Sensitive value. Pass in as a secure parameter. |
storageAccountName | The storage account name. | string |
AzurePowerShellScript
Name | Description | Value |
---|---|---|
kind | Type of the script. | "AzurePowerShell" (required) |
properties | Properties of the Azure PowerShell script object. | AzurePowerShellScriptProperties (required) |
AzurePowerShellScriptProperties
Name | Description | Value |
---|---|---|
arguments | Command line arguments to pass to the script. Arguments are separated by spaces. ex: -Name blue* -Location 'West US 2' | string |
azPowerShellVersion | Azure PowerShell module version to be used. | string (required) |
cleanupPreference | The clean up preference when the script execution gets in a terminal state. Default setting is 'Always'. | "Always" "OnExpiration" "OnSuccess" |
containerSettings | Container settings. | ContainerConfiguration |
environmentVariables | The environment variables to pass over to the script. | EnvironmentVariable[] |
forceUpdateTag | Gets or sets how the deployment script should be forced to execute even if the script resource has not changed. Can be current time stamp or a GUID. | string |
primaryScriptUri | Uri for the script. This is the entry point for the external script. | string |
retentionInterval | Interval for which the service retains the script resource after it reaches a terminal state. Resource will be deleted when this duration expires. Duration is based on ISO 8601 pattern (for example P1D means one day). | string (required) |
scriptContent | Script body. | string |
storageAccountSettings | Storage Account settings. | StorageAccountConfiguration |
supportingScriptUris | Supporting files for the external script. | string[] |
timeout | Maximum allowed script execution time specified in ISO 8601 format. Default value is P1D | string |
ManagedServiceIdentity
Name | Description | Value |
---|---|---|
type | Type of the managed identity. | "UserAssigned" |
identity_ids | The list of user-assigned managed identities associated with the resource. Key is the Azure resource Id of the managed identity. | Array of user identity IDs. |
ManagedServiceIdentityUserAssignedIdentities
Name | Description | Value |
---|---|---|
{customized property} | UserAssignedIdentity |
UserAssignedIdentity
This object doesn't contain any properties to set during deployment. All properties are ReadOnly.