Note: Azure Spring Apps Application Deployments (Microsoft.AppPlatform/Spring/apps/deployments) is now deprecated and will be retired on 2028-05-31. See https://aka.ms/asaretirement for more information.
Bicep resource definition
The Spring/apps/deployments resource type can be deployed with operations that target:
For a list of changed properties in each API version, see change log.
To create a Microsoft.AppPlatform/Spring/apps/deployments resource, add the following Bicep to your template.
resource symbolicname 'Microsoft.AppPlatform/Spring/apps/deployments@2022-01-01-preview' = {
parent: resourceSymbolicName
name: 'string'
properties: {
active: bool
deploymentSettings: {
addonConfigs: {
{customized property}: {
{customized property}: any(...)
}
}
containerProbeSettings: {
disableProbe: bool
}
environmentVariables: {
{customized property}: 'string'
}
resourceRequests: {
cpu: 'string'
memory: 'string'
}
}
source: {
version: 'string'
type: 'string'
// For remaining properties, see UserSourceInfo objects
}
}
sku: {
capacity: int
name: 'string'
tier: 'string'
}
}
UserSourceInfo objects
Set the type property to specify the type of object.
For BuildResult, use:
{
buildResultId: 'string'
type: 'BuildResult'
}
For Container, use:
{
customContainer: {
args: [
'string'
]
command: [
'string'
]
containerImage: 'string'
imageRegistryCredential: {
password: 'string'
username: 'string'
}
server: 'string'
}
type: 'Container'
}
For Jar, use:
{
jvmOptions: 'string'
relativePath: 'string'
runtimeVersion: 'string'
type: 'Jar'
}
For NetCoreZip, use:
{
netCoreMainEntryPath: 'string'
relativePath: 'string'
runtimeVersion: 'string'
type: 'NetCoreZip'
}
For Source, use:
{
artifactSelector: 'string'
relativePath: 'string'
runtimeVersion: 'string'
type: 'Source'
}
Property Values
| Name |
Description |
Value |
| name |
The resource name |
string (required) |
| parent |
In Bicep, you can specify the parent resource for a child resource. You only need to add this property when the child resource is declared outside of the parent resource.
For more information, see Child resource outside parent resource. |
Symbolic name for resource of type: Spring/apps |
| properties |
Properties of the Deployment resource |
DeploymentResourceProperties |
| sku |
Sku of the Deployment resource |
Sku |
AddonProfile
BuildResultUserSourceInfo
| Name |
Description |
Value |
| buildResultId |
Resource id of an existing succeeded build result under the same Spring instance. |
string |
| type |
Type of the source uploaded |
'BuildResult' (required) |
ContainerProbeSettings
| Name |
Description |
Value |
| disableProbe |
Indicates whether disable the liveness and readiness probe |
bool |
CustomContainer
| Name |
Description |
Value |
| args |
Arguments to the entrypoint. The docker image's CMD is used if this is not provided. |
string[] |
| command |
Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is used if this is not provided. |
string[] |
| containerImage |
Container image of the custom container. This should be in the form of <repository>:<tag> without the server name of the registry |
string |
| imageRegistryCredential |
Credential of the image registry |
ImageRegistryCredential |
| server |
The name of the registry that contains the container image |
string |
CustomContainerUserSourceInfo
| Name |
Description |
Value |
| customContainer |
Custom container payload |
CustomContainer |
| type |
Type of the source uploaded |
'Container' (required) |
DeploymentResourceProperties
| Name |
Description |
Value |
| active |
Indicates whether the Deployment is active |
bool |
| deploymentSettings |
Deployment settings of the Deployment |
DeploymentSettings |
| source |
Uploaded source information of the deployment. |
UserSourceInfo |
DeploymentSettings
DeploymentSettingsAddonConfigs
DeploymentSettingsEnvironmentVariables
ImageRegistryCredential
| Name |
Description |
Value |
| password |
The password of the image registry credential |
string |
| username |
The username of the image registry credential |
string |
JarUploadedUserSourceInfo
| Name |
Description |
Value |
| jvmOptions |
JVM parameter |
string |
| relativePath |
Relative path of the storage which stores the source |
string |
| runtimeVersion |
Runtime version of the Jar file |
string |
| type |
Type of the source uploaded |
'Jar' (required) |
NetCoreZipUploadedUserSourceInfo
| Name |
Description |
Value |
| netCoreMainEntryPath |
The path to the .NET executable relative to zip root |
string |
| relativePath |
Relative path of the storage which stores the source |
string |
| runtimeVersion |
Runtime version of the .Net file |
string |
| type |
Type of the source uploaded |
'NetCoreZip' (required) |
ResourceRequests
| Name |
Description |
Value |
| cpu |
Required CPU. 1 core can be represented by 1 or 1000m. This should be 500m or 1 for Basic tier, and {500m, 1, 2, 3, 4} for Standard tier. |
string |
| memory |
Required memory. 1 GB can be represented by 1Gi or 1024Mi. This should be {512Mi, 1Gi, 2Gi} for Basic tier, and {512Mi, 1Gi, 2Gi, ..., 8Gi} for Standard tier. |
string |
Sku
| Name |
Description |
Value |
| capacity |
Current capacity of the target resource |
int |
| name |
Name of the Sku |
string |
| tier |
Tier of the Sku |
string |
SourceUploadedUserSourceInfo
| Name |
Description |
Value |
| artifactSelector |
Selector for the artifact to be used for the deployment for multi-module projects. This should be the relative path to the target module/project. |
string |
| relativePath |
Relative path of the storage which stores the source |
string |
| runtimeVersion |
Runtime version of the source file |
string |
| type |
Type of the source uploaded |
'Source' (required) |
UserSourceInfo
Usage Examples
Azure Quickstart Samples
The following Azure Quickstart templates contain Bicep samples for deploying this resource type.
ARM template resource definition
The Spring/apps/deployments resource type can be deployed with operations that target:
For a list of changed properties in each API version, see change log.
To create a Microsoft.AppPlatform/Spring/apps/deployments resource, add the following JSON to your template.
{
"type": "Microsoft.AppPlatform/Spring/apps/deployments",
"apiVersion": "2022-01-01-preview",
"name": "string",
"properties": {
"active": "bool",
"deploymentSettings": {
"addonConfigs": {
"{customized property}": {
"{customized property}": {}
}
},
"containerProbeSettings": {
"disableProbe": "bool"
},
"environmentVariables": {
"{customized property}": "string"
},
"resourceRequests": {
"cpu": "string",
"memory": "string"
}
},
"source": {
"version": "string",
"type": "string"
// For remaining properties, see UserSourceInfo objects
}
},
"sku": {
"capacity": "int",
"name": "string",
"tier": "string"
}
}
UserSourceInfo objects
Set the type property to specify the type of object.
For BuildResult, use:
{
"buildResultId": "string",
"type": "BuildResult"
}
For Container, use:
{
"customContainer": {
"args": [ "string" ],
"command": [ "string" ],
"containerImage": "string",
"imageRegistryCredential": {
"password": "string",
"username": "string"
},
"server": "string"
},
"type": "Container"
}
For Jar, use:
{
"jvmOptions": "string",
"relativePath": "string",
"runtimeVersion": "string",
"type": "Jar"
}
For NetCoreZip, use:
{
"netCoreMainEntryPath": "string",
"relativePath": "string",
"runtimeVersion": "string",
"type": "NetCoreZip"
}
For Source, use:
{
"artifactSelector": "string",
"relativePath": "string",
"runtimeVersion": "string",
"type": "Source"
}
Property Values
| Name |
Description |
Value |
| apiVersion |
The api version |
'2022-01-01-preview' |
| name |
The resource name |
string (required) |
| properties |
Properties of the Deployment resource |
DeploymentResourceProperties |
| sku |
Sku of the Deployment resource |
Sku |
| type |
The resource type |
'Microsoft.AppPlatform/Spring/apps/deployments' |
AddonProfile
BuildResultUserSourceInfo
| Name |
Description |
Value |
| buildResultId |
Resource id of an existing succeeded build result under the same Spring instance. |
string |
| type |
Type of the source uploaded |
'BuildResult' (required) |
ContainerProbeSettings
| Name |
Description |
Value |
| disableProbe |
Indicates whether disable the liveness and readiness probe |
bool |
CustomContainer
| Name |
Description |
Value |
| args |
Arguments to the entrypoint. The docker image's CMD is used if this is not provided. |
string[] |
| command |
Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is used if this is not provided. |
string[] |
| containerImage |
Container image of the custom container. This should be in the form of <repository>:<tag> without the server name of the registry |
string |
| imageRegistryCredential |
Credential of the image registry |
ImageRegistryCredential |
| server |
The name of the registry that contains the container image |
string |
CustomContainerUserSourceInfo
| Name |
Description |
Value |
| customContainer |
Custom container payload |
CustomContainer |
| type |
Type of the source uploaded |
'Container' (required) |
DeploymentResourceProperties
| Name |
Description |
Value |
| active |
Indicates whether the Deployment is active |
bool |
| deploymentSettings |
Deployment settings of the Deployment |
DeploymentSettings |
| source |
Uploaded source information of the deployment. |
UserSourceInfo |
DeploymentSettings
DeploymentSettingsAddonConfigs
DeploymentSettingsEnvironmentVariables
ImageRegistryCredential
| Name |
Description |
Value |
| password |
The password of the image registry credential |
string |
| username |
The username of the image registry credential |
string |
JarUploadedUserSourceInfo
| Name |
Description |
Value |
| jvmOptions |
JVM parameter |
string |
| relativePath |
Relative path of the storage which stores the source |
string |
| runtimeVersion |
Runtime version of the Jar file |
string |
| type |
Type of the source uploaded |
'Jar' (required) |
NetCoreZipUploadedUserSourceInfo
| Name |
Description |
Value |
| netCoreMainEntryPath |
The path to the .NET executable relative to zip root |
string |
| relativePath |
Relative path of the storage which stores the source |
string |
| runtimeVersion |
Runtime version of the .Net file |
string |
| type |
Type of the source uploaded |
'NetCoreZip' (required) |
ResourceRequests
| Name |
Description |
Value |
| cpu |
Required CPU. 1 core can be represented by 1 or 1000m. This should be 500m or 1 for Basic tier, and {500m, 1, 2, 3, 4} for Standard tier. |
string |
| memory |
Required memory. 1 GB can be represented by 1Gi or 1024Mi. This should be {512Mi, 1Gi, 2Gi} for Basic tier, and {512Mi, 1Gi, 2Gi, ..., 8Gi} for Standard tier. |
string |
Sku
| Name |
Description |
Value |
| capacity |
Current capacity of the target resource |
int |
| name |
Name of the Sku |
string |
| tier |
Tier of the Sku |
string |
SourceUploadedUserSourceInfo
| Name |
Description |
Value |
| artifactSelector |
Selector for the artifact to be used for the deployment for multi-module projects. This should be the relative path to the target module/project. |
string |
| relativePath |
Relative path of the storage which stores the source |
string |
| runtimeVersion |
Runtime version of the source file |
string |
| type |
Type of the source uploaded |
'Source' (required) |
UserSourceInfo
Usage Examples
Azure Quickstart Templates
The following Azure Quickstart templates deploy this resource type.
The Spring/apps/deployments resource type can be deployed with operations that target:
For a list of changed properties in each API version, see change log.
To create a Microsoft.AppPlatform/Spring/apps/deployments resource, add the following Terraform to your template.
resource "azapi_resource" "symbolicname" {
type = "Microsoft.AppPlatform/Spring/apps/deployments@2022-01-01-preview"
name = "string"
parent_id = "string"
body = {
properties = {
active = bool
deploymentSettings = {
addonConfigs = {
{customized property} = {
{customized property} = ?
}
}
containerProbeSettings = {
disableProbe = bool
}
environmentVariables = {
{customized property} = "string"
}
resourceRequests = {
cpu = "string"
memory = "string"
}
}
source = {
version = "string"
type = "string"
// For remaining properties, see UserSourceInfo objects
}
}
sku = {
capacity = int
name = "string"
tier = "string"
}
}
}
UserSourceInfo objects
Set the type property to specify the type of object.
For BuildResult, use:
{
buildResultId = "string"
type = "BuildResult"
}
For Container, use:
{
customContainer = {
args = [
"string"
]
command = [
"string"
]
containerImage = "string"
imageRegistryCredential = {
password = "string"
username = "string"
}
server = "string"
}
type = "Container"
}
For Jar, use:
{
jvmOptions = "string"
relativePath = "string"
runtimeVersion = "string"
type = "Jar"
}
For NetCoreZip, use:
{
netCoreMainEntryPath = "string"
relativePath = "string"
runtimeVersion = "string"
type = "NetCoreZip"
}
For Source, use:
{
artifactSelector = "string"
relativePath = "string"
runtimeVersion = "string"
type = "Source"
}
Property Values
| Name |
Description |
Value |
| name |
The resource name |
string (required) |
| parent_id |
The ID of the resource that is the parent for this resource. |
ID for resource of type: Spring/apps |
| properties |
Properties of the Deployment resource |
DeploymentResourceProperties |
| sku |
Sku of the Deployment resource |
Sku |
| type |
The resource type |
"Microsoft.AppPlatform/Spring/apps/deployments@2022-01-01-preview" |
AddonProfile
BuildResultUserSourceInfo
| Name |
Description |
Value |
| buildResultId |
Resource id of an existing succeeded build result under the same Spring instance. |
string |
| type |
Type of the source uploaded |
'BuildResult' (required) |
ContainerProbeSettings
| Name |
Description |
Value |
| disableProbe |
Indicates whether disable the liveness and readiness probe |
bool |
CustomContainer
| Name |
Description |
Value |
| args |
Arguments to the entrypoint. The docker image's CMD is used if this is not provided. |
string[] |
| command |
Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is used if this is not provided. |
string[] |
| containerImage |
Container image of the custom container. This should be in the form of <repository>:<tag> without the server name of the registry |
string |
| imageRegistryCredential |
Credential of the image registry |
ImageRegistryCredential |
| server |
The name of the registry that contains the container image |
string |
CustomContainerUserSourceInfo
| Name |
Description |
Value |
| customContainer |
Custom container payload |
CustomContainer |
| type |
Type of the source uploaded |
'Container' (required) |
DeploymentResourceProperties
| Name |
Description |
Value |
| active |
Indicates whether the Deployment is active |
bool |
| deploymentSettings |
Deployment settings of the Deployment |
DeploymentSettings |
| source |
Uploaded source information of the deployment. |
UserSourceInfo |
DeploymentSettings
DeploymentSettingsAddonConfigs
DeploymentSettingsEnvironmentVariables
ImageRegistryCredential
| Name |
Description |
Value |
| password |
The password of the image registry credential |
string |
| username |
The username of the image registry credential |
string |
JarUploadedUserSourceInfo
| Name |
Description |
Value |
| jvmOptions |
JVM parameter |
string |
| relativePath |
Relative path of the storage which stores the source |
string |
| runtimeVersion |
Runtime version of the Jar file |
string |
| type |
Type of the source uploaded |
'Jar' (required) |
NetCoreZipUploadedUserSourceInfo
| Name |
Description |
Value |
| netCoreMainEntryPath |
The path to the .NET executable relative to zip root |
string |
| relativePath |
Relative path of the storage which stores the source |
string |
| runtimeVersion |
Runtime version of the .Net file |
string |
| type |
Type of the source uploaded |
'NetCoreZip' (required) |
ResourceRequests
| Name |
Description |
Value |
| cpu |
Required CPU. 1 core can be represented by 1 or 1000m. This should be 500m or 1 for Basic tier, and {500m, 1, 2, 3, 4} for Standard tier. |
string |
| memory |
Required memory. 1 GB can be represented by 1Gi or 1024Mi. This should be {512Mi, 1Gi, 2Gi} for Basic tier, and {512Mi, 1Gi, 2Gi, ..., 8Gi} for Standard tier. |
string |
Sku
| Name |
Description |
Value |
| capacity |
Current capacity of the target resource |
int |
| name |
Name of the Sku |
string |
| tier |
Tier of the Sku |
string |
SourceUploadedUserSourceInfo
| Name |
Description |
Value |
| artifactSelector |
Selector for the artifact to be used for the deployment for multi-module projects. This should be the relative path to the target module/project. |
string |
| relativePath |
Relative path of the storage which stores the source |
string |
| runtimeVersion |
Runtime version of the source file |
string |
| type |
Type of the source uploaded |
'Source' (required) |
UserSourceInfo
Usage Examples
A basic example of deploying Spring Cloud 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" "Spring" {
type = "Microsoft.AppPlatform/Spring@2023-05-01-preview"
parent_id = azapi_resource.resourceGroup.id
name = var.resource_name
location = var.location
body = {
properties = {
zoneRedundant = false
}
sku = {
name = "E0"
}
}
schema_validation_enabled = false
response_export_values = ["*"]
}
resource "azapi_resource" "app" {
type = "Microsoft.AppPlatform/Spring/apps@2023-05-01-preview"
parent_id = azapi_resource.Spring.id
name = var.resource_name
location = var.location
body = {
properties = {
customPersistentDisks = [
]
enableEndToEndTLS = false
public = false
}
}
schema_validation_enabled = false
response_export_values = ["*"]
}
resource "azapi_resource" "deployment" {
type = "Microsoft.AppPlatform/Spring/apps/deployments@2023-05-01-preview"
parent_id = azapi_resource.app.id
name = var.resource_name
body = {
properties = {
deploymentSettings = {
environmentVariables = {
}
}
source = {
customContainer = {
args = [
]
command = [
]
containerImage = "springio/gs-spring-boot-docker"
languageFramework = ""
server = "docker.io"
}
type = "Container"
}
}
sku = {
capacity = 1
name = "E0"
tier = "Enterprise"
}
}
schema_validation_enabled = false
response_export_values = ["*"]
}