注:Azure Spring Apps Application Deployments(Microsoft.AppPlatform/Spring/apps/deployments)は現在非推奨となり、2028年5月31日に廃止されます。 詳細については、https://aka.ms/asaretirement を参照してください。
Bicepリソースの定義
Spring/apps/deployments リソースの種類は、次をターゲットとする操作でデプロイできます。
-
リソース グループの - リソース グループのデプロイ コマンド 参照
各 API バージョンで変更されたプロパティの一覧については、変更ログの参照してください。
Microsoft.AppPlatform/Spring/apps/deploymentsリソースを作成するには、テンプレートに以下のBicepを追加してください。
resource symbolicname 'Microsoft.AppPlatform/Spring/apps/deployments@2024-05-01-preview' = {
parent: resourceSymbolicName
name: 'string'
properties: {
active: bool
deploymentSettings: {
addonConfigs: {
{customized property}: any(...)
}
apms: [
{
resourceId: 'string'
}
]
containerProbeSettings: {
disableProbe: bool
}
environmentVariables: {
{customized property}: 'string'
}
livenessProbe: {
disableProbe: bool
failureThreshold: int
initialDelaySeconds: int
periodSeconds: int
probeAction: {
type: 'string'
// For remaining properties, see ProbeAction objects
}
successThreshold: int
timeoutSeconds: int
}
readinessProbe: {
disableProbe: bool
failureThreshold: int
initialDelaySeconds: int
periodSeconds: int
probeAction: {
type: 'string'
// For remaining properties, see ProbeAction objects
}
successThreshold: int
timeoutSeconds: int
}
resourceRequests: {
cpu: 'string'
memory: 'string'
}
scale: {
maxReplicas: int
minReplicas: int
rules: [
{
azureQueue: {
auth: [
{
secretRef: 'string'
triggerParameter: 'string'
}
]
queueLength: int
queueName: 'string'
}
custom: {
auth: [
{
secretRef: 'string'
triggerParameter: 'string'
}
]
metadata: {
{customized property}: 'string'
}
type: 'string'
}
http: {
auth: [
{
secretRef: 'string'
triggerParameter: 'string'
}
]
metadata: {
{customized property}: 'string'
}
}
name: 'string'
tcp: {
auth: [
{
secretRef: 'string'
triggerParameter: 'string'
}
]
metadata: {
{customized property}: 'string'
}
}
}
]
}
startupProbe: {
disableProbe: bool
failureThreshold: int
initialDelaySeconds: int
periodSeconds: int
probeAction: {
type: 'string'
// For remaining properties, see ProbeAction objects
}
successThreshold: int
timeoutSeconds: int
}
terminationGracePeriodSeconds: int
}
source: {
version: 'string'
type: 'string'
// For remaining properties, see UserSourceInfo objects
}
}
sku: {
capacity: int
name: 'string'
tier: 'string'
}
}
ProbeAction オブジェクト
型 プロパティを設定して、オブジェクトの型を指定します。
ExecAction の場合は、次を使用します。
{
command: [
'string'
]
type: 'ExecAction'
}
HTTPGetAction の場合は、次を使用します。
{
path: 'string'
scheme: 'string'
type: 'HTTPGetAction'
}
TCPSocketAction の場合は、次を使用します。
{
type: 'TCPSocketAction'
}
UserSourceInfo オブジェクト
型 プロパティを設定して、オブジェクトの型を指定します。
BuildResult には、次を使用します。
{
buildResultId: 'string'
type: 'BuildResult'
}
コンテナには、次を使用します。
{
customContainer: {
args: [
'string'
]
command: [
'string'
]
containerImage: 'string'
imageRegistryCredential: {
password: 'string'
username: 'string'
}
languageFramework: 'string'
server: 'string'
}
type: 'Container'
}
Jar の場合は、次を使用します。
{
jvmOptions: 'string'
relativePath: 'string'
runtimeVersion: 'string'
type: 'Jar'
}
NetCoreZip の場合は、以下を使用します。
{
netCoreMainEntryPath: 'string'
relativePath: 'string'
runtimeVersion: 'string'
type: 'NetCoreZip'
}
[ ソース] には、次を使用します。
{
artifactSelector: 'string'
relativePath: 'string'
runtimeVersion: 'string'
type: 'Source'
}
戦争の場合は、以下を使用します。
{
jvmOptions: 'string'
relativePath: 'string'
runtimeVersion: 'string'
serverVersion: 'string'
type: 'War'
}
プロパティ値
| Name |
Description |
Value |
| name |
リソース名 |
文字列 (必須) |
| 親 |
Bicepでは、子リソースの親リソースを指定することができます。 このプロパティを追加する必要があるのは、子リソースが親リソースの外部で宣言されている場合のみです。
詳細については、「親リソースの外部 子リソース」を参照してください。 |
型のリソースのシンボリック名: Spring/apps |
| properties |
デプロイ リソースのプロパティ |
DeploymentResourceProperties |
| sku |
デプロイ リソースの SKU |
Sku |
ApmReference
| Name |
Description |
Value |
| resourceId |
APM のリソース ID |
文字列 (必須) |
BuildResultUserSourceInfo
| Name |
Description |
Value |
| buildResultId |
同じ Spring インスタンスの既存の成功したビルド結果のリソース ID。 |
文字列 |
| 型 |
アップロードされたソースの種類 |
'BuildResult' (必須) |
ContainerProbeSettings
| Name |
Description |
Value |
| disableProbe |
liveness プローブと準備プローブを無効にするかどうかを示します |
bool |
CustomContainer
| Name |
Description |
Value |
| args |
エントリポイントの引数。 これが指定されていない場合は、Docker イメージの CMD が使用されます。 |
string[] |
| command |
Entrypoint 配列。 シェル内では実行されません。 これが指定されていない場合は、Docker イメージの ENTRYPOINT が使用されます。 |
string[] |
| containerImage |
カスタム コンテナーのコンテナー イメージ。 これは、<リポジトリの>の形式である必要があります。レジストリのサーバー名のないタグ<> |
文字列 |
| imageRegistryCredential |
イメージ レジストリの資格情報 |
ImageRegistryCredential |
| languageFramework |
アップロードされたコンテナー イメージの言語フレームワーク。 サポートされる値: "springboot"、""、null。 |
文字列 |
| サーバー |
コンテナー イメージを含むレジストリの名前 |
文字列 |
CustomContainerUserSourceInfo
| Name |
Description |
Value |
| customContainer |
カスタム コンテナー ペイロード |
CustomContainer |
| 型 |
アップロードされたソースの種類 |
'コンテナ' (必須) |
CustomScaleRule
| Name |
Description |
Value |
| auth |
カスタム スケール ルールの認証シークレット。 |
ScaleRuleAuth[] |
| メタデータ |
カスタム スケール ルールを記述するメタデータ プロパティ。 |
CustomScaleRuleMetadata |
| 型 |
カスタム スケール ルールの種類 例: azure-servicebus、redis など。 |
文字列 |
DeploymentResourceProperties
DeploymentSettings
DeploymentSettingsAddonConfigs
DeploymentSettingsEnvironmentVariables
ExecAction
| Name |
Description |
Value |
| command |
コマンドはコンテナー内で実行するコマンド ラインであり、コマンドの作業ディレクトリはコンテナーのファイルシステムのルート ('/') です。 このコマンドはシェル内で実行されないため、従来のシェル命令 ('|'など) は機能しません。 シェルを使用するには、そのシェルを明示的に呼び出す必要があります。 終了ステータス 0 はライブ/正常として扱われ、0 以外は異常として扱われます。 |
string[] |
| 型 |
正常性チェックを実行するために実行するアクションの種類。 |
'ExecAction' (必須) |
HttpGetAction
| Name |
Description |
Value |
| パス |
HTTP サーバー上のアクセスのパス。 |
文字列 |
| scheme |
ホストへの接続に使用するスキーム。 既定値は HTTP です。
指定できる列挙値:
-
"HTTP" は、使用されるスキームが http:// されることを意味します
-
"HTTPS" は、使用されるスキームが https:// されることを意味します |
'HTTP' 'HTTPS' |
| 型 |
正常性チェックを実行するために実行するアクションの種類。 |
'HTTPGetAction' (必須) |
HttpScaleRule
ImageRegistryCredential
| Name |
Description |
Value |
| パスワード |
イメージ レジストリ資格情報のパスワード |
文字列 |
| ユーザー名 |
イメージ レジストリ資格情報のユーザー名 |
文字列 |
JarUploadedUserSourceInfo
| Name |
Description |
Value |
| jvmOptions |
JVM パラメーター |
文字列 |
| relativePath |
ソースを格納するストレージの相対パス |
文字列 |
| runtimeVersion |
Jar ファイルのランタイム バージョン |
文字列 |
| 型 |
アップロードされたソースの種類 |
'Jar' (必須) |
NetCoreZipUploadedUserSourceInfo
| Name |
Description |
Value |
| netCoreMainEntryPath |
zipルートに対する.NET実行ファイルへのパス |
文字列 |
| relativePath |
ソースを格納するストレージの相対パス |
文字列 |
| runtimeVersion |
.Net ファイルのランタイム バージョン |
文字列 |
| 型 |
アップロードされたソースの種類 |
'NetCoreZip' (必須) |
Probe
| Name |
Description |
Value |
| disableProbe |
プローブが無効かどうかを示します。 |
bool (必須) |
| failureThreshold |
成功した後に失敗したと見なされるプローブの連続する最小障害。 最小値は 1 です。 |
int |
| initialDelaySeconds |
プローブが開始されるまでのアプリ インスタンスの開始後の秒数。 詳細情報: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes |
int |
| periodSeconds |
プローブを実行する頻度 (秒単位)。 最小値は 1 です。 |
int |
| probeAction |
プローブのアクション。 |
ProbeAction |
| successThreshold |
失敗した後にプローブが成功したと見なされる最小連続成功数。 ライブ性と起動には 1 にする必要があります。 最小値は 1 です。 |
int |
| timeoutSeconds |
プローブがタイムアウトする秒数。最小値は 1 です。 |
int |
ProbeAction
QueueScaleRule
| Name |
Description |
Value |
| auth |
キュー スケール ルールの認証シークレット。 |
ScaleRuleAuth[] |
| queueLength |
キューの長さ。 |
int |
| queueName |
キュー名。 |
文字列 |
ResourceRequests
| Name |
Description |
Value |
| cpu |
必要な CPU。 1 コアは 1 または 1000m で表すことができます。 Basic レベルの場合は 500m または 1、Standard レベルの場合は {500m、1、2、3、4} です。 |
文字列 |
| メモリ |
必要なメモリ。 1 GB は 1Gi または 1024Mi で表すことができます。 Basic レベルの場合は {512Mi、1Gi、2Gi}、Standard レベルの場合は {512Mi、1Gi、2Gi、...、8Gi} です。 |
文字列 |
Scale
| Name |
Description |
Value |
| maxReplicas |
Optional. コンテナー レプリカの最大数。 既定値は 10 (設定されていない場合) です。 |
int |
| minReplicas |
Optional. コンテナー レプリカの最小数。 |
int |
| rules |
スケーリング ルール。 |
ScaleRule[] |
ScaleRule
ScaleRuleAuth
| Name |
Description |
Value |
| secretRef |
auth params を引き取るための Azure Spring Apps App Instance secret の名前。 |
文字列 |
| triggerParameter |
シークレットを使用するトリガー パラメーター |
文字列 |
Sku
| Name |
Description |
Value |
| キャパシティ |
ターゲット リソースの現在の容量 |
int |
| name |
SKU の名前 |
文字列 |
| レベル |
SKU の階層 |
文字列 |
SourceUploadedUserSourceInfo
| Name |
Description |
Value |
| artifactSelector |
マルチモジュール プロジェクトのデプロイに使用する成果物のセレクター。 これは次のようになります。 ターゲット モジュール/プロジェクトへの相対パス。 |
文字列 |
| relativePath |
ソースを格納するストレージの相対パス |
文字列 |
| runtimeVersion |
ソース ファイルのランタイム バージョン |
文字列 |
| 型 |
アップロードされたソースの種類 |
'Source' (必須) |
TcpScaleRule
TCPSocketAction
| Name |
Description |
Value |
| 型 |
正常性チェックを実行するために実行するアクションの種類。 |
'TCPSocketAction' (必須) |
UserSourceInfo
WarUploadedUserSourceInfo
| Name |
Description |
Value |
| jvmOptions |
JVM パラメーター |
文字列 |
| relativePath |
ソースを格納するストレージの相対パス |
文字列 |
| runtimeVersion |
war ファイルのランタイム バージョン |
文字列 |
| serverVersion |
サーバー のバージョン。現在サポートされているのは Apache Tomcat のみです |
文字列 |
| 型 |
アップロードされたソースの種類 |
「戦争」(必須) |
使用例
Bicep サンプル
Spring Cloud Deployment のデプロイの基本的な例。
param resourceName string = 'acctest0001'
param location string = 'westeurope'
resource spring 'Microsoft.AppPlatform/Spring@2023-05-01-preview' = {
name: resourceName
location: location
properties: {
zoneRedundant: false
}
sku: {
name: 'E0'
}
}
resource app 'Microsoft.AppPlatform/Spring/apps@2023-05-01-preview' = {
parent: spring
name: resourceName
location: location
properties: {
customPersistentDisks: []
enableEndToEndTLS: false
public: false
}
}
resource deployment 'Microsoft.AppPlatform/Spring/apps/deployments@2023-05-01-preview' = {
parent: app
name: resourceName
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'
}
}
Azure クイック スタートのサンプル
以下の Azure クイックスタートテンプレートには、このリソースタイプのデプロイのためのBicepサンプルが含まれています。
ARM テンプレート リソース定義
Spring/apps/deployments リソースの種類は、次をターゲットとする操作でデプロイできます。
-
リソース グループの - リソース グループのデプロイ コマンド 参照
各 API バージョンで変更されたプロパティの一覧については、変更ログの参照してください。
Microsoft.AppPlatform/Spring/apps/deployments リソースを作成するには、次の JSON をテンプレートに追加します。
{
"type": "Microsoft.AppPlatform/Spring/apps/deployments",
"apiVersion": "2024-05-01-preview",
"name": "string",
"properties": {
"active": "bool",
"deploymentSettings": {
"addonConfigs": {
"{customized property}": {}
},
"apms": [
{
"resourceId": "string"
}
],
"containerProbeSettings": {
"disableProbe": "bool"
},
"environmentVariables": {
"{customized property}": "string"
},
"livenessProbe": {
"disableProbe": "bool",
"failureThreshold": "int",
"initialDelaySeconds": "int",
"periodSeconds": "int",
"probeAction": {
"type": "string"
// For remaining properties, see ProbeAction objects
},
"successThreshold": "int",
"timeoutSeconds": "int"
},
"readinessProbe": {
"disableProbe": "bool",
"failureThreshold": "int",
"initialDelaySeconds": "int",
"periodSeconds": "int",
"probeAction": {
"type": "string"
// For remaining properties, see ProbeAction objects
},
"successThreshold": "int",
"timeoutSeconds": "int"
},
"resourceRequests": {
"cpu": "string",
"memory": "string"
},
"scale": {
"maxReplicas": "int",
"minReplicas": "int",
"rules": [
{
"azureQueue": {
"auth": [
{
"secretRef": "string",
"triggerParameter": "string"
}
],
"queueLength": "int",
"queueName": "string"
},
"custom": {
"auth": [
{
"secretRef": "string",
"triggerParameter": "string"
}
],
"metadata": {
"{customized property}": "string"
},
"type": "string"
},
"http": {
"auth": [
{
"secretRef": "string",
"triggerParameter": "string"
}
],
"metadata": {
"{customized property}": "string"
}
},
"name": "string",
"tcp": {
"auth": [
{
"secretRef": "string",
"triggerParameter": "string"
}
],
"metadata": {
"{customized property}": "string"
}
}
}
]
},
"startupProbe": {
"disableProbe": "bool",
"failureThreshold": "int",
"initialDelaySeconds": "int",
"periodSeconds": "int",
"probeAction": {
"type": "string"
// For remaining properties, see ProbeAction objects
},
"successThreshold": "int",
"timeoutSeconds": "int"
},
"terminationGracePeriodSeconds": "int"
},
"source": {
"version": "string",
"type": "string"
// For remaining properties, see UserSourceInfo objects
}
},
"sku": {
"capacity": "int",
"name": "string",
"tier": "string"
}
}
ProbeAction オブジェクト
型 プロパティを設定して、オブジェクトの型を指定します。
ExecAction の場合は、次を使用します。
{
"command": [ "string" ],
"type": "ExecAction"
}
HTTPGetAction の場合は、次を使用します。
{
"path": "string",
"scheme": "string",
"type": "HTTPGetAction"
}
TCPSocketAction の場合は、次を使用します。
{
"type": "TCPSocketAction"
}
UserSourceInfo オブジェクト
型 プロパティを設定して、オブジェクトの型を指定します。
BuildResult には、次を使用します。
{
"buildResultId": "string",
"type": "BuildResult"
}
コンテナには、次を使用します。
{
"customContainer": {
"args": [ "string" ],
"command": [ "string" ],
"containerImage": "string",
"imageRegistryCredential": {
"password": "string",
"username": "string"
},
"languageFramework": "string",
"server": "string"
},
"type": "Container"
}
Jar の場合は、次を使用します。
{
"jvmOptions": "string",
"relativePath": "string",
"runtimeVersion": "string",
"type": "Jar"
}
NetCoreZip の場合は、以下を使用します。
{
"netCoreMainEntryPath": "string",
"relativePath": "string",
"runtimeVersion": "string",
"type": "NetCoreZip"
}
[ ソース] には、次を使用します。
{
"artifactSelector": "string",
"relativePath": "string",
"runtimeVersion": "string",
"type": "Source"
}
戦争の場合は、以下を使用します。
{
"jvmOptions": "string",
"relativePath": "string",
"runtimeVersion": "string",
"serverVersion": "string",
"type": "War"
}
プロパティ値
| Name |
Description |
Value |
| apiVersion |
API のバージョン |
'2024-05-01-preview' |
| name |
リソース名 |
文字列 (必須) |
| properties |
デプロイ リソースのプロパティ |
DeploymentResourceProperties |
| sku |
デプロイ リソースの SKU |
Sku |
| 型 |
リソースの種類 |
'Microsoft.AppPlatform/Spring/apps/deployments' |
ApmReference
| Name |
Description |
Value |
| resourceId |
APM のリソース ID |
文字列 (必須) |
BuildResultUserSourceInfo
| Name |
Description |
Value |
| buildResultId |
同じ Spring インスタンスの既存の成功したビルド結果のリソース ID。 |
文字列 |
| 型 |
アップロードされたソースの種類 |
'BuildResult' (必須) |
ContainerProbeSettings
| Name |
Description |
Value |
| disableProbe |
liveness プローブと準備プローブを無効にするかどうかを示します |
bool |
CustomContainer
| Name |
Description |
Value |
| args |
エントリポイントの引数。 これが指定されていない場合は、Docker イメージの CMD が使用されます。 |
string[] |
| command |
Entrypoint 配列。 シェル内では実行されません。 これが指定されていない場合は、Docker イメージの ENTRYPOINT が使用されます。 |
string[] |
| containerImage |
カスタム コンテナーのコンテナー イメージ。 これは、<リポジトリの>の形式である必要があります。レジストリのサーバー名のないタグ<> |
文字列 |
| imageRegistryCredential |
イメージ レジストリの資格情報 |
ImageRegistryCredential |
| languageFramework |
アップロードされたコンテナー イメージの言語フレームワーク。 サポートされる値: "springboot"、""、null。 |
文字列 |
| サーバー |
コンテナー イメージを含むレジストリの名前 |
文字列 |
CustomContainerUserSourceInfo
| Name |
Description |
Value |
| customContainer |
カスタム コンテナー ペイロード |
CustomContainer |
| 型 |
アップロードされたソースの種類 |
'コンテナ' (必須) |
CustomScaleRule
| Name |
Description |
Value |
| auth |
カスタム スケール ルールの認証シークレット。 |
ScaleRuleAuth[] |
| メタデータ |
カスタム スケール ルールを記述するメタデータ プロパティ。 |
CustomScaleRuleMetadata |
| 型 |
カスタム スケール ルールの種類 例: azure-servicebus、redis など。 |
文字列 |
DeploymentResourceProperties
DeploymentSettings
DeploymentSettingsAddonConfigs
DeploymentSettingsEnvironmentVariables
ExecAction
| Name |
Description |
Value |
| command |
コマンドはコンテナー内で実行するコマンド ラインであり、コマンドの作業ディレクトリはコンテナーのファイルシステムのルート ('/') です。 このコマンドはシェル内で実行されないため、従来のシェル命令 ('|'など) は機能しません。 シェルを使用するには、そのシェルを明示的に呼び出す必要があります。 終了ステータス 0 はライブ/正常として扱われ、0 以外は異常として扱われます。 |
string[] |
| 型 |
正常性チェックを実行するために実行するアクションの種類。 |
'ExecAction' (必須) |
HttpGetAction
| Name |
Description |
Value |
| パス |
HTTP サーバー上のアクセスのパス。 |
文字列 |
| scheme |
ホストへの接続に使用するスキーム。 既定値は HTTP です。
指定できる列挙値:
-
"HTTP" は、使用されるスキームが http:// されることを意味します
-
"HTTPS" は、使用されるスキームが https:// されることを意味します |
'HTTP' 'HTTPS' |
| 型 |
正常性チェックを実行するために実行するアクションの種類。 |
'HTTPGetAction' (必須) |
HttpScaleRule
ImageRegistryCredential
| Name |
Description |
Value |
| パスワード |
イメージ レジストリ資格情報のパスワード |
文字列 |
| ユーザー名 |
イメージ レジストリ資格情報のユーザー名 |
文字列 |
JarUploadedUserSourceInfo
| Name |
Description |
Value |
| jvmOptions |
JVM パラメーター |
文字列 |
| relativePath |
ソースを格納するストレージの相対パス |
文字列 |
| runtimeVersion |
Jar ファイルのランタイム バージョン |
文字列 |
| 型 |
アップロードされたソースの種類 |
'Jar' (必須) |
NetCoreZipUploadedUserSourceInfo
| Name |
Description |
Value |
| netCoreMainEntryPath |
zipルートに対する.NET実行ファイルへのパス |
文字列 |
| relativePath |
ソースを格納するストレージの相対パス |
文字列 |
| runtimeVersion |
.Net ファイルのランタイム バージョン |
文字列 |
| 型 |
アップロードされたソースの種類 |
'NetCoreZip' (必須) |
Probe
| Name |
Description |
Value |
| disableProbe |
プローブが無効かどうかを示します。 |
bool (必須) |
| failureThreshold |
成功した後に失敗したと見なされるプローブの連続する最小障害。 最小値は 1 です。 |
int |
| initialDelaySeconds |
プローブが開始されるまでのアプリ インスタンスの開始後の秒数。 詳細情報: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes |
int |
| periodSeconds |
プローブを実行する頻度 (秒単位)。 最小値は 1 です。 |
int |
| probeAction |
プローブのアクション。 |
ProbeAction |
| successThreshold |
失敗した後にプローブが成功したと見なされる最小連続成功数。 ライブ性と起動には 1 にする必要があります。 最小値は 1 です。 |
int |
| timeoutSeconds |
プローブがタイムアウトする秒数。最小値は 1 です。 |
int |
ProbeAction
QueueScaleRule
| Name |
Description |
Value |
| auth |
キュー スケール ルールの認証シークレット。 |
ScaleRuleAuth[] |
| queueLength |
キューの長さ。 |
int |
| queueName |
キュー名。 |
文字列 |
ResourceRequests
| Name |
Description |
Value |
| cpu |
必要な CPU。 1 コアは 1 または 1000m で表すことができます。 Basic レベルの場合は 500m または 1、Standard レベルの場合は {500m、1、2、3、4} です。 |
文字列 |
| メモリ |
必要なメモリ。 1 GB は 1Gi または 1024Mi で表すことができます。 Basic レベルの場合は {512Mi、1Gi、2Gi}、Standard レベルの場合は {512Mi、1Gi、2Gi、...、8Gi} です。 |
文字列 |
Scale
| Name |
Description |
Value |
| maxReplicas |
Optional. コンテナー レプリカの最大数。 既定値は 10 (設定されていない場合) です。 |
int |
| minReplicas |
Optional. コンテナー レプリカの最小数。 |
int |
| rules |
スケーリング ルール。 |
ScaleRule[] |
ScaleRule
ScaleRuleAuth
| Name |
Description |
Value |
| secretRef |
auth params を引き取るための Azure Spring Apps App Instance secret の名前。 |
文字列 |
| triggerParameter |
シークレットを使用するトリガー パラメーター |
文字列 |
Sku
| Name |
Description |
Value |
| キャパシティ |
ターゲット リソースの現在の容量 |
int |
| name |
SKU の名前 |
文字列 |
| レベル |
SKU の階層 |
文字列 |
SourceUploadedUserSourceInfo
| Name |
Description |
Value |
| artifactSelector |
マルチモジュール プロジェクトのデプロイに使用する成果物のセレクター。 これは次のようになります。 ターゲット モジュール/プロジェクトへの相対パス。 |
文字列 |
| relativePath |
ソースを格納するストレージの相対パス |
文字列 |
| runtimeVersion |
ソース ファイルのランタイム バージョン |
文字列 |
| 型 |
アップロードされたソースの種類 |
'Source' (必須) |
TcpScaleRule
TCPSocketAction
| Name |
Description |
Value |
| 型 |
正常性チェックを実行するために実行するアクションの種類。 |
'TCPSocketAction' (必須) |
UserSourceInfo
WarUploadedUserSourceInfo
| Name |
Description |
Value |
| jvmOptions |
JVM パラメーター |
文字列 |
| relativePath |
ソースを格納するストレージの相対パス |
文字列 |
| runtimeVersion |
war ファイルのランタイム バージョン |
文字列 |
| serverVersion |
サーバー のバージョン。現在サポートされているのは Apache Tomcat のみです |
文字列 |
| 型 |
アップロードされたソースの種類 |
「戦争」(必須) |
使用例
Azure クイックスタート テンプレート
以下のAzureクイックスタートテンプレートはこのリソースタイプを展開します。
Spring/apps/deployments リソースの種類は、次をターゲットとする操作でデプロイできます。
各 API バージョンで変更されたプロパティの一覧については、変更ログの参照してください。
Microsoft.AppPlatform/Spring/apps/deployments リソースを作成するには、次の Terraform をテンプレートに追加します。
resource "azapi_resource" "symbolicname" {
type = "Microsoft.AppPlatform/Spring/apps/deployments@2024-05-01-preview"
name = "string"
parent_id = "string"
body = {
properties = {
active = bool
deploymentSettings = {
addonConfigs = {
{customized property} = ?
}
apms = [
{
resourceId = "string"
}
]
containerProbeSettings = {
disableProbe = bool
}
environmentVariables = {
{customized property} = "string"
}
livenessProbe = {
disableProbe = bool
failureThreshold = int
initialDelaySeconds = int
periodSeconds = int
probeAction = {
type = "string"
// For remaining properties, see ProbeAction objects
}
successThreshold = int
timeoutSeconds = int
}
readinessProbe = {
disableProbe = bool
failureThreshold = int
initialDelaySeconds = int
periodSeconds = int
probeAction = {
type = "string"
// For remaining properties, see ProbeAction objects
}
successThreshold = int
timeoutSeconds = int
}
resourceRequests = {
cpu = "string"
memory = "string"
}
scale = {
maxReplicas = int
minReplicas = int
rules = [
{
azureQueue = {
auth = [
{
secretRef = "string"
triggerParameter = "string"
}
]
queueLength = int
queueName = "string"
}
custom = {
auth = [
{
secretRef = "string"
triggerParameter = "string"
}
]
metadata = {
{customized property} = "string"
}
type = "string"
}
http = {
auth = [
{
secretRef = "string"
triggerParameter = "string"
}
]
metadata = {
{customized property} = "string"
}
}
name = "string"
tcp = {
auth = [
{
secretRef = "string"
triggerParameter = "string"
}
]
metadata = {
{customized property} = "string"
}
}
}
]
}
startupProbe = {
disableProbe = bool
failureThreshold = int
initialDelaySeconds = int
periodSeconds = int
probeAction = {
type = "string"
// For remaining properties, see ProbeAction objects
}
successThreshold = int
timeoutSeconds = int
}
terminationGracePeriodSeconds = int
}
source = {
version = "string"
type = "string"
// For remaining properties, see UserSourceInfo objects
}
}
sku = {
capacity = int
name = "string"
tier = "string"
}
}
}
ProbeAction オブジェクト
型 プロパティを設定して、オブジェクトの型を指定します。
ExecAction の場合は、次を使用します。
{
command = [
"string"
]
type = "ExecAction"
}
HTTPGetAction の場合は、次を使用します。
{
path = "string"
scheme = "string"
type = "HTTPGetAction"
}
TCPSocketAction の場合は、次を使用します。
{
type = "TCPSocketAction"
}
UserSourceInfo オブジェクト
型 プロパティを設定して、オブジェクトの型を指定します。
BuildResult には、次を使用します。
{
buildResultId = "string"
type = "BuildResult"
}
コンテナには、次を使用します。
{
customContainer = {
args = [
"string"
]
command = [
"string"
]
containerImage = "string"
imageRegistryCredential = {
password = "string"
username = "string"
}
languageFramework = "string"
server = "string"
}
type = "Container"
}
Jar の場合は、次を使用します。
{
jvmOptions = "string"
relativePath = "string"
runtimeVersion = "string"
type = "Jar"
}
NetCoreZip の場合は、以下を使用します。
{
netCoreMainEntryPath = "string"
relativePath = "string"
runtimeVersion = "string"
type = "NetCoreZip"
}
[ ソース] には、次を使用します。
{
artifactSelector = "string"
relativePath = "string"
runtimeVersion = "string"
type = "Source"
}
戦争の場合は、以下を使用します。
{
jvmOptions = "string"
relativePath = "string"
runtimeVersion = "string"
serverVersion = "string"
type = "War"
}
プロパティ値
| Name |
Description |
Value |
| name |
リソース名 |
文字列 (必須) |
| parent_id |
このリソースの親であるリソースの ID。 |
タイプのリソースのID: Spring/apps |
| properties |
デプロイ リソースのプロパティ |
DeploymentResourceProperties |
| sku |
デプロイ リソースの SKU |
Sku |
| 型 |
リソースの種類 |
"Microsoft.AppPlatform/Spring/apps/deployments@2024-05-01-preview" |
ApmReference
| Name |
Description |
Value |
| resourceId |
APM のリソース ID |
文字列 (必須) |
BuildResultUserSourceInfo
| Name |
Description |
Value |
| buildResultId |
同じ Spring インスタンスの既存の成功したビルド結果のリソース ID。 |
文字列 |
| 型 |
アップロードされたソースの種類 |
'BuildResult' (必須) |
ContainerProbeSettings
| Name |
Description |
Value |
| disableProbe |
liveness プローブと準備プローブを無効にするかどうかを示します |
bool |
CustomContainer
| Name |
Description |
Value |
| args |
エントリポイントの引数。 これが指定されていない場合は、Docker イメージの CMD が使用されます。 |
string[] |
| command |
Entrypoint 配列。 シェル内では実行されません。 これが指定されていない場合は、Docker イメージの ENTRYPOINT が使用されます。 |
string[] |
| containerImage |
カスタム コンテナーのコンテナー イメージ。 これは、<リポジトリの>の形式である必要があります。レジストリのサーバー名のないタグ<> |
文字列 |
| imageRegistryCredential |
イメージ レジストリの資格情報 |
ImageRegistryCredential |
| languageFramework |
アップロードされたコンテナー イメージの言語フレームワーク。 サポートされる値: "springboot"、""、null。 |
文字列 |
| サーバー |
コンテナー イメージを含むレジストリの名前 |
文字列 |
CustomContainerUserSourceInfo
| Name |
Description |
Value |
| customContainer |
カスタム コンテナー ペイロード |
CustomContainer |
| 型 |
アップロードされたソースの種類 |
'コンテナ' (必須) |
CustomScaleRule
| Name |
Description |
Value |
| auth |
カスタム スケール ルールの認証シークレット。 |
ScaleRuleAuth[] |
| メタデータ |
カスタム スケール ルールを記述するメタデータ プロパティ。 |
CustomScaleRuleMetadata |
| 型 |
カスタム スケール ルールの種類 例: azure-servicebus、redis など。 |
文字列 |
DeploymentResourceProperties
DeploymentSettings
DeploymentSettingsAddonConfigs
DeploymentSettingsEnvironmentVariables
ExecAction
| Name |
Description |
Value |
| command |
コマンドはコンテナー内で実行するコマンド ラインであり、コマンドの作業ディレクトリはコンテナーのファイルシステムのルート ('/') です。 このコマンドはシェル内で実行されないため、従来のシェル命令 ('|'など) は機能しません。 シェルを使用するには、そのシェルを明示的に呼び出す必要があります。 終了ステータス 0 はライブ/正常として扱われ、0 以外は異常として扱われます。 |
string[] |
| 型 |
正常性チェックを実行するために実行するアクションの種類。 |
'ExecAction' (必須) |
HttpGetAction
| Name |
Description |
Value |
| パス |
HTTP サーバー上のアクセスのパス。 |
文字列 |
| scheme |
ホストへの接続に使用するスキーム。 既定値は HTTP です。
指定できる列挙値:
-
"HTTP" は、使用されるスキームが http:// されることを意味します
-
"HTTPS" は、使用されるスキームが https:// されることを意味します |
'HTTP' 'HTTPS' |
| 型 |
正常性チェックを実行するために実行するアクションの種類。 |
'HTTPGetAction' (必須) |
HttpScaleRule
ImageRegistryCredential
| Name |
Description |
Value |
| パスワード |
イメージ レジストリ資格情報のパスワード |
文字列 |
| ユーザー名 |
イメージ レジストリ資格情報のユーザー名 |
文字列 |
JarUploadedUserSourceInfo
| Name |
Description |
Value |
| jvmOptions |
JVM パラメーター |
文字列 |
| relativePath |
ソースを格納するストレージの相対パス |
文字列 |
| runtimeVersion |
Jar ファイルのランタイム バージョン |
文字列 |
| 型 |
アップロードされたソースの種類 |
'Jar' (必須) |
NetCoreZipUploadedUserSourceInfo
| Name |
Description |
Value |
| netCoreMainEntryPath |
zipルートに対する.NET実行ファイルへのパス |
文字列 |
| relativePath |
ソースを格納するストレージの相対パス |
文字列 |
| runtimeVersion |
.Net ファイルのランタイム バージョン |
文字列 |
| 型 |
アップロードされたソースの種類 |
'NetCoreZip' (必須) |
Probe
| Name |
Description |
Value |
| disableProbe |
プローブが無効かどうかを示します。 |
bool (必須) |
| failureThreshold |
成功した後に失敗したと見なされるプローブの連続する最小障害。 最小値は 1 です。 |
int |
| initialDelaySeconds |
プローブが開始されるまでのアプリ インスタンスの開始後の秒数。 詳細情報: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes |
int |
| periodSeconds |
プローブを実行する頻度 (秒単位)。 最小値は 1 です。 |
int |
| probeAction |
プローブのアクション。 |
ProbeAction |
| successThreshold |
失敗した後にプローブが成功したと見なされる最小連続成功数。 ライブ性と起動には 1 にする必要があります。 最小値は 1 です。 |
int |
| timeoutSeconds |
プローブがタイムアウトする秒数。最小値は 1 です。 |
int |
ProbeAction
QueueScaleRule
| Name |
Description |
Value |
| auth |
キュー スケール ルールの認証シークレット。 |
ScaleRuleAuth[] |
| queueLength |
キューの長さ。 |
int |
| queueName |
キュー名。 |
文字列 |
ResourceRequests
| Name |
Description |
Value |
| cpu |
必要な CPU。 1 コアは 1 または 1000m で表すことができます。 Basic レベルの場合は 500m または 1、Standard レベルの場合は {500m、1、2、3、4} です。 |
文字列 |
| メモリ |
必要なメモリ。 1 GB は 1Gi または 1024Mi で表すことができます。 Basic レベルの場合は {512Mi、1Gi、2Gi}、Standard レベルの場合は {512Mi、1Gi、2Gi、...、8Gi} です。 |
文字列 |
Scale
| Name |
Description |
Value |
| maxReplicas |
Optional. コンテナー レプリカの最大数。 既定値は 10 (設定されていない場合) です。 |
int |
| minReplicas |
Optional. コンテナー レプリカの最小数。 |
int |
| rules |
スケーリング ルール。 |
ScaleRule[] |
ScaleRule
ScaleRuleAuth
| Name |
Description |
Value |
| secretRef |
auth params を引き取るための Azure Spring Apps App Instance secret の名前。 |
文字列 |
| triggerParameter |
シークレットを使用するトリガー パラメーター |
文字列 |
Sku
| Name |
Description |
Value |
| キャパシティ |
ターゲット リソースの現在の容量 |
int |
| name |
SKU の名前 |
文字列 |
| レベル |
SKU の階層 |
文字列 |
SourceUploadedUserSourceInfo
| Name |
Description |
Value |
| artifactSelector |
マルチモジュール プロジェクトのデプロイに使用する成果物のセレクター。 これは次のようになります。 ターゲット モジュール/プロジェクトへの相対パス。 |
文字列 |
| relativePath |
ソースを格納するストレージの相対パス |
文字列 |
| runtimeVersion |
ソース ファイルのランタイム バージョン |
文字列 |
| 型 |
アップロードされたソースの種類 |
'Source' (必須) |
TcpScaleRule
TCPSocketAction
| Name |
Description |
Value |
| 型 |
正常性チェックを実行するために実行するアクションの種類。 |
'TCPSocketAction' (必須) |
UserSourceInfo
WarUploadedUserSourceInfo
| Name |
Description |
Value |
| jvmOptions |
JVM パラメーター |
文字列 |
| relativePath |
ソースを格納するストレージの相対パス |
文字列 |
| runtimeVersion |
war ファイルのランタイム バージョン |
文字列 |
| serverVersion |
サーバー のバージョン。現在サポートされているのは Apache Tomcat のみです |
文字列 |
| 型 |
アップロードされたソースの種類 |
「戦争」(必須) |
使用例
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 = ["*"]
}