注意:Azure Spring 應用程式 建構服務建構器(Microsoft.AppPlatform/Spring/buildServices/builders)現已棄用,將於 2028-05-31 正式退休。 如需相關資訊,請參閱 https://aka.ms/asaretirement 。
Bicep 資源定義
Spring/buildServices/builders 資源類型可以使用目標作業來部署:
如需每個 API 版本中已變更屬性的清單,請參閱 變更記錄檔。
使用範例
Bicep 範例
部署 Spring Cloud Builder 的基本範例。
param resourceName string = 'acctest0001'
param location string = 'westeurope'
resource spring 'Microsoft.AppPlatform/Spring@2023-05-01-preview' = {
name: resourceName
location: location
sku: {
name: 'E0'
}
properties: {
zoneRedundant: false
}
}
resource buildService 'Microsoft.AppPlatform/Spring/buildServices@2023-05-01-preview' = {
name: 'default'
parent: spring
properties: {}
}
resource builder 'Microsoft.AppPlatform/Spring/buildServices/builders@2023-05-01-preview' = {
name: resourceName
properties: {
buildpackGroups: [
{
buildpacks: [
{
id: 'tanzu-buildpacks/java-azure'
}
]
name: 'mix'
}
]
stack: {
id: 'io.buildpacks.stacks.bionic'
version: 'base'
}
}
}
若要建立 Microsoft.AppPlatform/Spring/buildServices/builders 資源,請將下列 Bicep 新增至範本。
resource symbolicname 'Microsoft.AppPlatform/Spring/buildServices/builders@2023-12-01' = {
parent: resourceSymbolicName
name: 'string'
properties: {
buildpackGroups: [
{
buildpacks: [
{
id: 'string'
}
]
name: 'string'
}
]
stack: {
id: 'string'
version: 'string'
}
}
}
屬性值
BuilderProperties
Buildpack屬性
| 名字 |
描述 |
價值 |
| 識別碼 |
buildpack 的標識碼 |
字串 |
BuildpacksGroup屬性
| 名字 |
描述 |
價值 |
| 構建包 |
buildpack 群組中的 Buildpacks |
Buildpack屬性 |
| 名字 |
Buildpack 組名 |
字串 |
StackProperties
| 名字 |
描述 |
價值 |
| 識別碼 |
ClusterStack 的標識碼。 |
字串 |
| 版本 |
ClusterStack 的版本 |
字串 |
ARM 樣本資源定義
Spring/buildServices/builders 資源類型可以使用目標作業來部署:
使用範例
若要建立 Microsoft.AppPlatform/Spring/buildServices/builders 資源,請將下列 JSON 新增至範本。
{
"type": "Microsoft.AppPlatform/Spring/buildServices/builders",
"apiVersion": "2023-12-01",
"name": "string",
"properties": {
"buildpackGroups": [
{
"buildpacks": [
{
"id": "string"
}
],
"name": "string"
}
],
"stack": {
"id": "string",
"version": "string"
}
}
}
屬性值
| 名字 |
描述 |
價值 |
| apiVersion |
API 版本 |
'2023-12-01' |
| 名字 |
資源名稱 |
字串 (必要) |
| 性能 |
Builder 資源的 屬性。 |
BuilderProperties |
| 型別 |
資源類型 |
“Microsoft.AppPlatform/Spring/buildServices/builders” |
BuilderProperties
Buildpack屬性
| 名字 |
描述 |
價值 |
| 識別碼 |
buildpack 的標識碼 |
字串 |
BuildpacksGroup屬性
| 名字 |
描述 |
價值 |
| 構建包 |
buildpack 群組中的 Buildpacks |
Buildpack屬性 |
| 名字 |
Buildpack 組名 |
字串 |
StackProperties
| 名字 |
描述 |
價值 |
| 識別碼 |
ClusterStack 的標識碼。 |
字串 |
| 版本 |
ClusterStack 的版本 |
字串 |
Spring/buildServices/builders 資源類型可以使用目標作業來部署:
-
資源團體 關於每個 API 版本變更屬性的清單,請參見 變更日誌。
使用範例
部署 Spring Cloud Builder 的基本範例。
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 = ["*"]
}
data "azapi_resource_id" "buildService" {
type = "Microsoft.AppPlatform/Spring/buildServices@2023-05-01-preview"
parent_id = azapi_resource.Spring.id
name = "default"
}
resource "azapi_resource_action" "buildService" {
type = "Microsoft.AppPlatform/Spring/buildServices@2023-05-01-preview"
resource_id = data.azapi_resource_id.buildService.id
method = "PUT"
body = {
properties = {
}
}
response_export_values = ["*"]
}
resource "azapi_resource" "builder" {
type = "Microsoft.AppPlatform/Spring/buildServices/builders@2023-05-01-preview"
parent_id = azapi_resource_action.buildService.id
name = var.resource_name
body = {
properties = {
buildpackGroups = [
{
buildpacks = [
{
id = "tanzu-buildpacks/java-azure"
},
]
name = "mix"
},
]
stack = {
id = "io.buildpacks.stacks.bionic"
version = "base"
}
}
}
schema_validation_enabled = false
response_export_values = ["*"]
}
若要建立 Microsoft.AppPlatform/Spring/buildServices/builders 資源,請將下列 Terraform 新增至範本。
resource "azapi_resource" "symbolicname" {
type = "Microsoft.AppPlatform/Spring/buildServices/builders@2023-12-01"
name = "string"
parent_id = "string"
body = {
properties = {
buildpackGroups = [
{
buildpacks = [
{
id = "string"
}
]
name = "string"
}
]
stack = {
id = "string"
version = "string"
}
}
}
}
屬性值
| 名字 |
描述 |
價值 |
| 名字 |
資源名稱 |
字串 (必要) |
| 父項識別碼 |
此資源為父系之資源的標識碼。 |
類型資源的標識碼:Spring/buildServices |
| 性能 |
Builder 資源的 屬性。 |
BuilderProperties |
| 型別 |
資源類型 |
“Microsoft.AppPlatform/Spring/buildServices/builders@2023-12-01” |
BuilderProperties
Buildpack屬性
| 名字 |
描述 |
價值 |
| 識別碼 |
buildpack 的標識碼 |
字串 |
BuildpacksGroup屬性
| 名字 |
描述 |
價值 |
| 構建包 |
buildpack 群組中的 Buildpacks |
Buildpack屬性 |
| 名字 |
Buildpack 組名 |
字串 |
StackProperties
| 名字 |
描述 |
價值 |
| 識別碼 |
ClusterStack 的標識碼。 |
字串 |
| 版本 |
ClusterStack 的版本 |
字串 |