Bicep 資源定義
工作流程資源類型可以使用目標作業來部署:
- 資源群組 - 請參閱 資源群組部署命令
如需每個 API 版本中已變更屬性的清單,請參閱 變更記錄檔。
資源格式
若要建立 Microsoft.DevHub/workflows 資源,請將下列 Bicep 新增至範本。
resource symbolicname 'Microsoft.DevHub/workflows@2025-03-01-preview' = {
location: 'string'
name: 'string'
properties: {
artifactGenerationProperties: {
appName: 'string'
builderVersion: 'string'
dockerfileGenerationMode: 'string'
dockerfileOutputDirectory: 'string'
generationLanguage: 'string'
imageName: 'string'
imageTag: 'string'
languageVersion: 'string'
manifestGenerationMode: 'string'
manifestOutputDirectory: 'string'
manifestType: 'string'
namespace: 'string'
port: 'string'
}
azurePipelineProfile: {
acr: 'string'
armServiceConnection: 'string'
build: {
dockerBuildContext: 'string'
dockerfile: 'string'
}
clusterId: 'string'
deployment: {
helmChartPath: 'string'
helmValues: 'string'
kubeManifestLocations: [
'string'
]
manifestType: 'string'
overrides: {
{customized property}: 'string'
}
}
lastWorkflowRun: {}
namespace: 'string'
pullRequest: {}
repository: {
adoOrganization: 'string'
branchName: 'string'
projectName: 'string'
repositoryName: 'string'
repositoryOwner: 'string'
}
}
githubWorkflowProfile: {
acr: {
acrRegistryName: 'string'
acrRepositoryName: 'string'
acrResourceGroup: 'string'
acrSubscriptionId: 'string'
}
aksResourceId: 'string'
branchName: 'string'
deploymentProperties: {
helmChartPath: 'string'
helmValues: 'string'
kubeManifestLocations: [
'string'
]
manifestType: 'string'
overrides: {
{customized property}: 'string'
}
}
dockerBuildContext: 'string'
dockerfile: 'string'
lastWorkflowRun: {}
namespace: 'string'
oidcCredentials: {
azureClientId: 'string'
azureTenantId: 'string'
}
repositoryName: 'string'
repositoryOwner: 'string'
}
templateWorkflowProfile: {
adoProviderProfile: {
armServiceConnection: 'string'
repository: {
adoOrganization: 'string'
branchName: 'string'
projectName: 'string'
repositoryName: 'string'
repositoryOwner: 'string'
}
}
deploymentTemplate: {
destination: 'string'
parameters: {
{customized property}: 'string'
}
templateId: 'string'
}
dockerfileTemplate: {
destination: 'string'
parameters: {
{customized property}: 'string'
}
templateId: 'string'
}
gitHubProviderProfile: {
oidcCredentials: {
azureClientId: 'string'
azureTenantId: 'string'
}
repository: {
branchName: 'string'
repositoryName: 'string'
repositoryOwner: 'string'
}
}
lastWorkflowRun: {}
manifestTemplates: [
{
destination: 'string'
parameters: {
{customized property}: 'string'
}
templateId: 'string'
}
]
pullRequest: {}
repositoryProvider: 'string'
workflowTemplate: {
destination: 'string'
parameters: {
{customized property}: 'string'
}
templateId: 'string'
}
}
}
tags: {
{customized property}: 'string'
}
}
屬性值
Microsoft.DevHub/workflows
| 名字 | 描述 | 價值 |
|---|---|---|
| 位置 | 資源所在的地理位置 | 字串 (必要) |
| 名字 | 資源名稱 | 字串 約束: 最小長度 = 1 最大長度 = 63 模式 = ^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$ (必要) |
| 性能 | 工作流程的屬性。 | 工作流屬性 |
| 標籤 | 資源標籤 | 標記名稱和值的字典。 請參閱範本中的 標籤 |
ACR
| 名字 | 描述 | 價值 |
|---|---|---|
| acrRegistryName | ACR 登錄 | 字串 |
| acrRepository名稱 | ACR 存放庫 | 字串 |
| acrResourceGroup | ACR 資源群組 | 字串 |
| acrSubscriptionId | ACR 訂用帳戶標識碼 | 字串 |
ADOProvider簡介
| 名字 | 描述 | 價值 |
|---|---|---|
| armServiceConnection | 管線相關聯的ARM服務連線名稱。 | 字串 |
| 存放庫 | 與工作流程相關聯的 ADO 存放庫詳細數據。 | ADO收藏 |
ADO收藏
| 名字 | 描述 | 價值 |
|---|---|---|
| ado組織 | 管線相關聯的 Azure DevOps 組織名稱。 | 字串 |
| branchName (分支名稱) | 工作流程所關聯之分支的名稱。 | 字串 |
| 專案名稱 | 管線相關聯的項目名稱。 | 字串 |
| repositoryName (儲存庫名稱) | 工作流程相關聯的存放庫名稱。 | 字串 |
| repository擁有者 | 工作流程相關聯之存放庫的擁有者。 | 字串 |
ArtifactGenerationProperties
| 名字 | 描述 | 價值 |
|---|---|---|
| 應用程式名稱 | 應用程式的名稱。 | 字串 |
| builderVersion | 用來在產生的 dockerfile 中建置程式代碼的語言映射版本。 | 字串 |
| dockerfile生成模式 | 要用於產生 Dockerfiles 的產生模式。 | '已禁用' '已啟用' |
| dockerfileOutputDirectory | 要輸出所產生 Dockerfile 的目錄。 | 字串 |
| generationLanguage | 所使用的程式設計語言。 | 'clojure' '夏普' 'erlang' '去' 'gomodule' 'gradle' '爪哇' 'JavaScript' 'php' 'python' '紅寶石' '锈' “斯威夫特” |
| 圖像名稱 | 要產生之映像的名稱。 | 字串 |
| imageTag (影像標籤) | 要套用至所產生影像的標記。 | 字串 |
| 語言版本 | 用於在產生的 dockerfile 中執行的語言映像版本。 | 字串 |
| manifestGenerationMode | 要用於產生指令清單的產生模式。 | '已禁用' '已啟用' |
| manifestOutputDirectory | 要輸出所產生指令清單的目錄。 | 字串 |
| manifestType | 決定要產生的指令清單類型。 | '舵' 'kube' |
| 命名空間 | 要部署應用程式至的命名空間。 | 字串 |
| 傳輸埠 | 應用程式公開的埠。 | 字串 |
AzurePipelineProfile
| 名字 | 描述 | 價值 |
|---|---|---|
| ACR | 與工作流程相關聯的 Azure Container Registry 存放庫資源識別碼。 | 字串 |
| armServiceConnection | 管線相關聯的ARM服務連線名稱。 | 字串 |
| 組建 | 建立與工作流程相關聯之存放庫的詳細數據。 | 組建 |
| clusterId | 應用程式將部署至的 Azure Kubernetes 叢集資源。 | 字串 |
| 部署 | 與工作流程相關聯的存放庫部署詳細數據。 | 部署 |
| lastWorkflowRun | 工作流運行 | |
| 命名空間 | 部署應用程式的 Kubernetes 命名空間。 | 字串 |
| 拉取請求 | 包含工作流程的提取要求詳細數據。 | 拉取請求 |
| 存放庫 | 與工作流程相關聯的 ADO 存放庫詳細數據。 | ADO收藏 |
建
| 名字 | 描述 | 價值 |
|---|---|---|
| dockerBuildContext | 存放庫中 Dockerfile 建置內容的路徑。 | 字串 |
| dockerfile | 存放庫內 Dockerfile 的路徑。 | 字串 |
部署
| 名字 | 描述 | 價值 |
|---|---|---|
| helmChartPath | 存放庫中的 Helm 圖表目錄路徑。 | 字串 |
| helm值 | 存放庫中的 Helm Values.yaml 檔案位置。 | 字串 |
| kubeManifestLocations | 字串[] | |
| manifestType | 決定存放庫中的指令清單類型。 | '舵' 'kube' 「用 kustomize」 |
| 重寫 | 指令清單覆寫值。 | DeploymentOverrides |
DeploymentOverrides
| 名字 | 描述 | 價值 |
|---|
GitHubProviderProfile
| 名字 | 描述 | 價值 |
|---|---|---|
| oidc憑證 | OIDC 與 GitHub 所需的欄位。 | Oidc憑證 |
| 存放庫 | 與工作流程相關聯的 GitHub 存放庫詳細數據。 | GitHub儲存庫 |
GitHub儲存庫
| 名字 | 描述 | 價值 |
|---|---|---|
| branchName (分支名稱) | 工作流程所關聯之分支的名稱。 | 字串 |
| repositoryName (儲存庫名稱) | 工作流程相關聯的存放庫名稱。 | 字串 |
| repository擁有者 | 工作流程相關聯之存放庫的擁有者。 | 字串 |
GitHubWorkflowProfile
| 名字 | 描述 | 價值 |
|---|---|---|
| ACR | Azure Container Registry 的相關信息 | ACR |
| aksResourceId (AKS 資源 ID) | 應用程式將部署至的 Azure Kubernetes 叢集資源。 | 字串 |
| branchName (分支名稱) | 存放庫分支名稱 | 字串 |
| deploymentProperties | 與工作流程相關聯的存放庫部署詳細數據。 | 部署 |
| dockerBuildContext | 存放庫中 Dockerfile 建置內容的路徑。 | 字串 |
| dockerfile | 存放庫內 Dockerfile 的路徑。 | 字串 |
| lastWorkflowRun | 工作流運行 | |
| 命名空間 | 部署應用程式的 Kubernetes 命名空間。 | 字串 |
| oidc憑證 | OIDC 與 GitHub 所需的欄位。 | GitHubWorkflowProfileOidcCredentials |
| repositoryName (儲存庫名稱) | 存放庫名稱 | 字串 |
| repository擁有者 | 存放庫擁有者 | 字串 |
GitHubWorkflowProfileOidcCredentials
| 名字 | 描述 | 價值 |
|---|---|---|
| azureClientId | Azure 應用程式用戶端識別碼 | 字串 |
| azureTenantId | Azure 目錄 (租使用者) 識別碼 | 字串 |
Oidc憑證
| 名字 | 描述 | 價值 |
|---|---|---|
| azureClientId | Azure 應用程式用戶端識別碼 | 字串 |
| azureTenantId | Azure 目錄 (租使用者) 識別碼 | 字串 |
拉取請求
| 名字 | 描述 | 價值 |
|---|
範本引用
| 名字 | 描述 | 價值 |
|---|---|---|
| 目的地 | 建立範本的目的地 | 字串 |
| 參數 | 範本建立的參數 | TemplateReferenceParameters (範本引用參數) |
| 樣板ID | 已建立版本的範本 arm 資源識別碼。 | 字串 |
TemplateReferenceParameters (範本引用參數)
| 名字 | 描述 | 價值 |
|---|
TemplateWorkflowProfile
| 名字 | 描述 | 價值 |
|---|---|---|
| adoProvider配置檔 | 與工作流程相關聯的 GitHub 存放庫詳細數據。 | ADOProvider簡介 |
| deploymentTemplate | ADO OAuth 的屬性。 | 範本引用 |
| dockerfileTemplate | ADO OAuth 的屬性。 | 範本引用 |
| gitHubProvider簡介 | 與工作流程相關聯的 GitHub 存放庫和認證的詳細數據。 | GitHubProviderProfile |
| lastWorkflowRun | 工作流運行 | |
| manifestTemplates | 範本引用[] | |
| 拉取請求 | 包含工作流程的提取要求詳細數據。 | 拉取請求 |
| repositoryProvider | 針對使用者存放庫提交的提取要求狀態。 | '阿多' 'GitHub' |
| 工作流範本 | ADO OAuth 的屬性。 | 範本引用 |
TrackedResourceTags
| 名字 | 描述 | 價值 |
|---|
工作流屬性
| 名字 | 描述 | 價值 |
|---|---|---|
| artifactGenerationProperties | 產生 dockerfile 和指令清單等成品的屬性。 | ArtifactGenerationProperties |
| azurePipeline配置檔 | Azure 管線的配置檔。 | AzurePipelineProfile |
| githubWorkflowProfile | Github 工作流程的配置檔。 | GitHubWorkflowProfile |
| templateWorkflowProfile | 範本工作流程的配置檔。 | TemplateWorkflowProfile |
工作流運行
| 名字 | 描述 | 價值 |
|---|
ARM 樣本資源定義
工作流程資源類型可以使用目標作業來部署:
使用範例
資源格式
若要建立 Microsoft.DevHub/workflows 資源,請將下列 JSON 新增至範本。
{
"type": "Microsoft.DevHub/workflows",
"apiVersion": "2025-03-01-preview",
"name": "string",
"location": "string",
"properties": {
"artifactGenerationProperties": {
"appName": "string",
"builderVersion": "string",
"dockerfileGenerationMode": "string",
"dockerfileOutputDirectory": "string",
"generationLanguage": "string",
"imageName": "string",
"imageTag": "string",
"languageVersion": "string",
"manifestGenerationMode": "string",
"manifestOutputDirectory": "string",
"manifestType": "string",
"namespace": "string",
"port": "string"
},
"azurePipelineProfile": {
"acr": "string",
"armServiceConnection": "string",
"build": {
"dockerBuildContext": "string",
"dockerfile": "string"
},
"clusterId": "string",
"deployment": {
"helmChartPath": "string",
"helmValues": "string",
"kubeManifestLocations": [ "string" ],
"manifestType": "string",
"overrides": {
"{customized property}": "string"
}
},
"lastWorkflowRun": {
},
"namespace": "string",
"pullRequest": {
},
"repository": {
"adoOrganization": "string",
"branchName": "string",
"projectName": "string",
"repositoryName": "string",
"repositoryOwner": "string"
}
},
"githubWorkflowProfile": {
"acr": {
"acrRegistryName": "string",
"acrRepositoryName": "string",
"acrResourceGroup": "string",
"acrSubscriptionId": "string"
},
"aksResourceId": "string",
"branchName": "string",
"deploymentProperties": {
"helmChartPath": "string",
"helmValues": "string",
"kubeManifestLocations": [ "string" ],
"manifestType": "string",
"overrides": {
"{customized property}": "string"
}
},
"dockerBuildContext": "string",
"dockerfile": "string",
"lastWorkflowRun": {
},
"namespace": "string",
"oidcCredentials": {
"azureClientId": "string",
"azureTenantId": "string"
},
"repositoryName": "string",
"repositoryOwner": "string"
},
"templateWorkflowProfile": {
"adoProviderProfile": {
"armServiceConnection": "string",
"repository": {
"adoOrganization": "string",
"branchName": "string",
"projectName": "string",
"repositoryName": "string",
"repositoryOwner": "string"
}
},
"deploymentTemplate": {
"destination": "string",
"parameters": {
"{customized property}": "string"
},
"templateId": "string"
},
"dockerfileTemplate": {
"destination": "string",
"parameters": {
"{customized property}": "string"
},
"templateId": "string"
},
"gitHubProviderProfile": {
"oidcCredentials": {
"azureClientId": "string",
"azureTenantId": "string"
},
"repository": {
"branchName": "string",
"repositoryName": "string",
"repositoryOwner": "string"
}
},
"lastWorkflowRun": {
},
"manifestTemplates": [
{
"destination": "string",
"parameters": {
"{customized property}": "string"
},
"templateId": "string"
}
],
"pullRequest": {
},
"repositoryProvider": "string",
"workflowTemplate": {
"destination": "string",
"parameters": {
"{customized property}": "string"
},
"templateId": "string"
}
}
},
"tags": {
"{customized property}": "string"
}
}
屬性值
Microsoft.DevHub/workflows
| 名字 | 描述 | 價值 |
|---|---|---|
| apiVersion | API 版本 | “2025-03-01-預覽” |
| 位置 | 資源所在的地理位置 | 字串 (必要) |
| 名字 | 資源名稱 | 字串 約束: 最小長度 = 1 最大長度 = 63 模式 = ^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$ (必要) |
| 性能 | 工作流程的屬性。 | 工作流屬性 |
| 標籤 | 資源標籤 | 標記名稱和值的字典。 請參閱範本中的 標籤 |
| 型別 | 資源類型 | “Microsoft.DevHub/工作流” |
ACR
| 名字 | 描述 | 價值 |
|---|---|---|
| acrRegistryName | ACR 登錄 | 字串 |
| acrRepository名稱 | ACR 存放庫 | 字串 |
| acrResourceGroup | ACR 資源群組 | 字串 |
| acrSubscriptionId | ACR 訂用帳戶標識碼 | 字串 |
ADOProvider簡介
| 名字 | 描述 | 價值 |
|---|---|---|
| armServiceConnection | 管線相關聯的ARM服務連線名稱。 | 字串 |
| 存放庫 | 與工作流程相關聯的 ADO 存放庫詳細數據。 | ADO收藏 |
ADO收藏
| 名字 | 描述 | 價值 |
|---|---|---|
| ado組織 | 管線相關聯的 Azure DevOps 組織名稱。 | 字串 |
| branchName (分支名稱) | 工作流程所關聯之分支的名稱。 | 字串 |
| 專案名稱 | 管線相關聯的項目名稱。 | 字串 |
| repositoryName (儲存庫名稱) | 工作流程相關聯的存放庫名稱。 | 字串 |
| repository擁有者 | 工作流程相關聯之存放庫的擁有者。 | 字串 |
ArtifactGenerationProperties
| 名字 | 描述 | 價值 |
|---|---|---|
| 應用程式名稱 | 應用程式的名稱。 | 字串 |
| builderVersion | 用來在產生的 dockerfile 中建置程式代碼的語言映射版本。 | 字串 |
| dockerfile生成模式 | 要用於產生 Dockerfiles 的產生模式。 | '已禁用' '已啟用' |
| dockerfileOutputDirectory | 要輸出所產生 Dockerfile 的目錄。 | 字串 |
| generationLanguage | 所使用的程式設計語言。 | 'clojure' '夏普' 'erlang' '去' 'gomodule' 'gradle' '爪哇' 'JavaScript' 'php' 'python' '紅寶石' '锈' “斯威夫特” |
| 圖像名稱 | 要產生之映像的名稱。 | 字串 |
| imageTag (影像標籤) | 要套用至所產生影像的標記。 | 字串 |
| 語言版本 | 用於在產生的 dockerfile 中執行的語言映像版本。 | 字串 |
| manifestGenerationMode | 要用於產生指令清單的產生模式。 | '已禁用' '已啟用' |
| manifestOutputDirectory | 要輸出所產生指令清單的目錄。 | 字串 |
| manifestType | 決定要產生的指令清單類型。 | '舵' 'kube' |
| 命名空間 | 要部署應用程式至的命名空間。 | 字串 |
| 傳輸埠 | 應用程式公開的埠。 | 字串 |
AzurePipelineProfile
| 名字 | 描述 | 價值 |
|---|---|---|
| ACR | 與工作流程相關聯的 Azure Container Registry 存放庫資源識別碼。 | 字串 |
| armServiceConnection | 管線相關聯的ARM服務連線名稱。 | 字串 |
| 組建 | 建立與工作流程相關聯之存放庫的詳細數據。 | 組建 |
| clusterId | 應用程式將部署至的 Azure Kubernetes 叢集資源。 | 字串 |
| 部署 | 與工作流程相關聯的存放庫部署詳細數據。 | 部署 |
| lastWorkflowRun | 工作流運行 | |
| 命名空間 | 部署應用程式的 Kubernetes 命名空間。 | 字串 |
| 拉取請求 | 包含工作流程的提取要求詳細數據。 | 拉取請求 |
| 存放庫 | 與工作流程相關聯的 ADO 存放庫詳細數據。 | ADO收藏 |
建
| 名字 | 描述 | 價值 |
|---|---|---|
| dockerBuildContext | 存放庫中 Dockerfile 建置內容的路徑。 | 字串 |
| dockerfile | 存放庫內 Dockerfile 的路徑。 | 字串 |
部署
| 名字 | 描述 | 價值 |
|---|---|---|
| helmChartPath | 存放庫中的 Helm 圖表目錄路徑。 | 字串 |
| helm值 | 存放庫中的 Helm Values.yaml 檔案位置。 | 字串 |
| kubeManifestLocations | 字串[] | |
| manifestType | 決定存放庫中的指令清單類型。 | '舵' 'kube' 「用 kustomize」 |
| 重寫 | 指令清單覆寫值。 | DeploymentOverrides |
DeploymentOverrides
| 名字 | 描述 | 價值 |
|---|
GitHubProviderProfile
| 名字 | 描述 | 價值 |
|---|---|---|
| oidc憑證 | OIDC 與 GitHub 所需的欄位。 | Oidc憑證 |
| 存放庫 | 與工作流程相關聯的 GitHub 存放庫詳細數據。 | GitHub儲存庫 |
GitHub儲存庫
| 名字 | 描述 | 價值 |
|---|---|---|
| branchName (分支名稱) | 工作流程所關聯之分支的名稱。 | 字串 |
| repositoryName (儲存庫名稱) | 工作流程相關聯的存放庫名稱。 | 字串 |
| repository擁有者 | 工作流程相關聯之存放庫的擁有者。 | 字串 |
GitHubWorkflowProfile
| 名字 | 描述 | 價值 |
|---|---|---|
| ACR | Azure Container Registry 的相關信息 | ACR |
| aksResourceId (AKS 資源 ID) | 應用程式將部署至的 Azure Kubernetes 叢集資源。 | 字串 |
| branchName (分支名稱) | 存放庫分支名稱 | 字串 |
| deploymentProperties | 與工作流程相關聯的存放庫部署詳細數據。 | 部署 |
| dockerBuildContext | 存放庫中 Dockerfile 建置內容的路徑。 | 字串 |
| dockerfile | 存放庫內 Dockerfile 的路徑。 | 字串 |
| lastWorkflowRun | 工作流運行 | |
| 命名空間 | 部署應用程式的 Kubernetes 命名空間。 | 字串 |
| oidc憑證 | OIDC 與 GitHub 所需的欄位。 | GitHubWorkflowProfileOidcCredentials |
| repositoryName (儲存庫名稱) | 存放庫名稱 | 字串 |
| repository擁有者 | 存放庫擁有者 | 字串 |
GitHubWorkflowProfileOidcCredentials
| 名字 | 描述 | 價值 |
|---|---|---|
| azureClientId | Azure 應用程式用戶端識別碼 | 字串 |
| azureTenantId | Azure 目錄 (租使用者) 識別碼 | 字串 |
Oidc憑證
| 名字 | 描述 | 價值 |
|---|---|---|
| azureClientId | Azure 應用程式用戶端識別碼 | 字串 |
| azureTenantId | Azure 目錄 (租使用者) 識別碼 | 字串 |
拉取請求
| 名字 | 描述 | 價值 |
|---|
範本引用
| 名字 | 描述 | 價值 |
|---|---|---|
| 目的地 | 建立範本的目的地 | 字串 |
| 參數 | 範本建立的參數 | TemplateReferenceParameters (範本引用參數) |
| 樣板ID | 已建立版本的範本 arm 資源識別碼。 | 字串 |
TemplateReferenceParameters (範本引用參數)
| 名字 | 描述 | 價值 |
|---|
TemplateWorkflowProfile
| 名字 | 描述 | 價值 |
|---|---|---|
| adoProvider配置檔 | 與工作流程相關聯的 GitHub 存放庫詳細數據。 | ADOProvider簡介 |
| deploymentTemplate | ADO OAuth 的屬性。 | 範本引用 |
| dockerfileTemplate | ADO OAuth 的屬性。 | 範本引用 |
| gitHubProvider簡介 | 與工作流程相關聯的 GitHub 存放庫和認證的詳細數據。 | GitHubProviderProfile |
| lastWorkflowRun | 工作流運行 | |
| manifestTemplates | 範本引用[] | |
| 拉取請求 | 包含工作流程的提取要求詳細數據。 | 拉取請求 |
| repositoryProvider | 針對使用者存放庫提交的提取要求狀態。 | '阿多' 'GitHub' |
| 工作流範本 | ADO OAuth 的屬性。 | 範本引用 |
TrackedResourceTags
| 名字 | 描述 | 價值 |
|---|
工作流屬性
| 名字 | 描述 | 價值 |
|---|---|---|
| artifactGenerationProperties | 產生 dockerfile 和指令清單等成品的屬性。 | ArtifactGenerationProperties |
| azurePipeline配置檔 | Azure 管線的配置檔。 | AzurePipelineProfile |
| githubWorkflowProfile | Github 工作流程的配置檔。 | GitHubWorkflowProfile |
| templateWorkflowProfile | 範本工作流程的配置檔。 | TemplateWorkflowProfile |
工作流運行
| 名字 | 描述 | 價值 |
|---|
Terraform (AzAPI 提供者) 資源定義
工作流程資源類型可以使用目標作業來部署:
- 資源團體 關於每個 API 版本變更屬性的清單,請參見 變更日誌。
資源格式
若要建立 Microsoft.DevHub/workflows 資源,請將下列 Terraform 新增至範本。
resource "azapi_resource" "symbolicname" {
type = "Microsoft.DevHub/workflows@2025-03-01-preview"
name = "string"
parent_id = "string"
location = "string"
tags = {
{customized property} = "string"
}
body = {
properties = {
artifactGenerationProperties = {
appName = "string"
builderVersion = "string"
dockerfileGenerationMode = "string"
dockerfileOutputDirectory = "string"
generationLanguage = "string"
imageName = "string"
imageTag = "string"
languageVersion = "string"
manifestGenerationMode = "string"
manifestOutputDirectory = "string"
manifestType = "string"
namespace = "string"
port = "string"
}
azurePipelineProfile = {
acr = "string"
armServiceConnection = "string"
build = {
dockerBuildContext = "string"
dockerfile = "string"
}
clusterId = "string"
deployment = {
helmChartPath = "string"
helmValues = "string"
kubeManifestLocations = [
"string"
]
manifestType = "string"
overrides = {
{customized property} = "string"
}
}
lastWorkflowRun = {
}
namespace = "string"
pullRequest = {
}
repository = {
adoOrganization = "string"
branchName = "string"
projectName = "string"
repositoryName = "string"
repositoryOwner = "string"
}
}
githubWorkflowProfile = {
acr = {
acrRegistryName = "string"
acrRepositoryName = "string"
acrResourceGroup = "string"
acrSubscriptionId = "string"
}
aksResourceId = "string"
branchName = "string"
deploymentProperties = {
helmChartPath = "string"
helmValues = "string"
kubeManifestLocations = [
"string"
]
manifestType = "string"
overrides = {
{customized property} = "string"
}
}
dockerBuildContext = "string"
dockerfile = "string"
lastWorkflowRun = {
}
namespace = "string"
oidcCredentials = {
azureClientId = "string"
azureTenantId = "string"
}
repositoryName = "string"
repositoryOwner = "string"
}
templateWorkflowProfile = {
adoProviderProfile = {
armServiceConnection = "string"
repository = {
adoOrganization = "string"
branchName = "string"
projectName = "string"
repositoryName = "string"
repositoryOwner = "string"
}
}
deploymentTemplate = {
destination = "string"
parameters = {
{customized property} = "string"
}
templateId = "string"
}
dockerfileTemplate = {
destination = "string"
parameters = {
{customized property} = "string"
}
templateId = "string"
}
gitHubProviderProfile = {
oidcCredentials = {
azureClientId = "string"
azureTenantId = "string"
}
repository = {
branchName = "string"
repositoryName = "string"
repositoryOwner = "string"
}
}
lastWorkflowRun = {
}
manifestTemplates = [
{
destination = "string"
parameters = {
{customized property} = "string"
}
templateId = "string"
}
]
pullRequest = {
}
repositoryProvider = "string"
workflowTemplate = {
destination = "string"
parameters = {
{customized property} = "string"
}
templateId = "string"
}
}
}
}
}
屬性值
Microsoft.DevHub/workflows
| 名字 | 描述 | 價值 |
|---|---|---|
| 位置 | 資源所在的地理位置 | 字串 (必要) |
| 名字 | 資源名稱 | 字串 約束: 最小長度 = 1 最大長度 = 63 模式 = ^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$ (必要) |
| 性能 | 工作流程的屬性。 | 工作流屬性 |
| 標籤 | 資源標籤 | 標記名稱和值的字典。 |
| 型別 | 資源類型 | “Microsoft.DevHub/workflows@2025-03-01-preview” |
ACR
| 名字 | 描述 | 價值 |
|---|---|---|
| acrRegistryName | ACR 登錄 | 字串 |
| acrRepository名稱 | ACR 存放庫 | 字串 |
| acrResourceGroup | ACR 資源群組 | 字串 |
| acrSubscriptionId | ACR 訂用帳戶標識碼 | 字串 |
ADOProvider簡介
| 名字 | 描述 | 價值 |
|---|---|---|
| armServiceConnection | 管線相關聯的ARM服務連線名稱。 | 字串 |
| 存放庫 | 與工作流程相關聯的 ADO 存放庫詳細數據。 | ADO收藏 |
ADO收藏
| 名字 | 描述 | 價值 |
|---|---|---|
| ado組織 | 管線相關聯的 Azure DevOps 組織名稱。 | 字串 |
| branchName (分支名稱) | 工作流程所關聯之分支的名稱。 | 字串 |
| 專案名稱 | 管線相關聯的項目名稱。 | 字串 |
| repositoryName (儲存庫名稱) | 工作流程相關聯的存放庫名稱。 | 字串 |
| repository擁有者 | 工作流程相關聯之存放庫的擁有者。 | 字串 |
ArtifactGenerationProperties
| 名字 | 描述 | 價值 |
|---|---|---|
| 應用程式名稱 | 應用程式的名稱。 | 字串 |
| builderVersion | 用來在產生的 dockerfile 中建置程式代碼的語言映射版本。 | 字串 |
| dockerfile生成模式 | 要用於產生 Dockerfiles 的產生模式。 | '已禁用' '已啟用' |
| dockerfileOutputDirectory | 要輸出所產生 Dockerfile 的目錄。 | 字串 |
| generationLanguage | 所使用的程式設計語言。 | 'clojure' '夏普' 'erlang' '去' 'gomodule' 'gradle' '爪哇' 'JavaScript' 'php' 'python' '紅寶石' '锈' “斯威夫特” |
| 圖像名稱 | 要產生之映像的名稱。 | 字串 |
| imageTag (影像標籤) | 要套用至所產生影像的標記。 | 字串 |
| 語言版本 | 用於在產生的 dockerfile 中執行的語言映像版本。 | 字串 |
| manifestGenerationMode | 要用於產生指令清單的產生模式。 | '已禁用' '已啟用' |
| manifestOutputDirectory | 要輸出所產生指令清單的目錄。 | 字串 |
| manifestType | 決定要產生的指令清單類型。 | '舵' 'kube' |
| 命名空間 | 要部署應用程式至的命名空間。 | 字串 |
| 傳輸埠 | 應用程式公開的埠。 | 字串 |
AzurePipelineProfile
| 名字 | 描述 | 價值 |
|---|---|---|
| ACR | 與工作流程相關聯的 Azure Container Registry 存放庫資源識別碼。 | 字串 |
| armServiceConnection | 管線相關聯的ARM服務連線名稱。 | 字串 |
| 組建 | 建立與工作流程相關聯之存放庫的詳細數據。 | 組建 |
| clusterId | 應用程式將部署至的 Azure Kubernetes 叢集資源。 | 字串 |
| 部署 | 與工作流程相關聯的存放庫部署詳細數據。 | 部署 |
| lastWorkflowRun | 工作流運行 | |
| 命名空間 | 部署應用程式的 Kubernetes 命名空間。 | 字串 |
| 拉取請求 | 包含工作流程的提取要求詳細數據。 | 拉取請求 |
| 存放庫 | 與工作流程相關聯的 ADO 存放庫詳細數據。 | ADO收藏 |
建
| 名字 | 描述 | 價值 |
|---|---|---|
| dockerBuildContext | 存放庫中 Dockerfile 建置內容的路徑。 | 字串 |
| dockerfile | 存放庫內 Dockerfile 的路徑。 | 字串 |
部署
| 名字 | 描述 | 價值 |
|---|---|---|
| helmChartPath | 存放庫中的 Helm 圖表目錄路徑。 | 字串 |
| helm值 | 存放庫中的 Helm Values.yaml 檔案位置。 | 字串 |
| kubeManifestLocations | 字串[] | |
| manifestType | 決定存放庫中的指令清單類型。 | '舵' 'kube' 「用 kustomize」 |
| 重寫 | 指令清單覆寫值。 | DeploymentOverrides |
DeploymentOverrides
| 名字 | 描述 | 價值 |
|---|
GitHubProviderProfile
| 名字 | 描述 | 價值 |
|---|---|---|
| oidc憑證 | OIDC 與 GitHub 所需的欄位。 | Oidc憑證 |
| 存放庫 | 與工作流程相關聯的 GitHub 存放庫詳細數據。 | GitHub儲存庫 |
GitHub儲存庫
| 名字 | 描述 | 價值 |
|---|---|---|
| branchName (分支名稱) | 工作流程所關聯之分支的名稱。 | 字串 |
| repositoryName (儲存庫名稱) | 工作流程相關聯的存放庫名稱。 | 字串 |
| repository擁有者 | 工作流程相關聯之存放庫的擁有者。 | 字串 |
GitHubWorkflowProfile
| 名字 | 描述 | 價值 |
|---|---|---|
| ACR | Azure Container Registry 的相關信息 | ACR |
| aksResourceId (AKS 資源 ID) | 應用程式將部署至的 Azure Kubernetes 叢集資源。 | 字串 |
| branchName (分支名稱) | 存放庫分支名稱 | 字串 |
| deploymentProperties | 與工作流程相關聯的存放庫部署詳細數據。 | 部署 |
| dockerBuildContext | 存放庫中 Dockerfile 建置內容的路徑。 | 字串 |
| dockerfile | 存放庫內 Dockerfile 的路徑。 | 字串 |
| lastWorkflowRun | 工作流運行 | |
| 命名空間 | 部署應用程式的 Kubernetes 命名空間。 | 字串 |
| oidc憑證 | OIDC 與 GitHub 所需的欄位。 | GitHubWorkflowProfileOidcCredentials |
| repositoryName (儲存庫名稱) | 存放庫名稱 | 字串 |
| repository擁有者 | 存放庫擁有者 | 字串 |
GitHubWorkflowProfileOidcCredentials
| 名字 | 描述 | 價值 |
|---|---|---|
| azureClientId | Azure 應用程式用戶端識別碼 | 字串 |
| azureTenantId | Azure 目錄 (租使用者) 識別碼 | 字串 |
Oidc憑證
| 名字 | 描述 | 價值 |
|---|---|---|
| azureClientId | Azure 應用程式用戶端識別碼 | 字串 |
| azureTenantId | Azure 目錄 (租使用者) 識別碼 | 字串 |
拉取請求
| 名字 | 描述 | 價值 |
|---|
範本引用
| 名字 | 描述 | 價值 |
|---|---|---|
| 目的地 | 建立範本的目的地 | 字串 |
| 參數 | 範本建立的參數 | TemplateReferenceParameters (範本引用參數) |
| 樣板ID | 已建立版本的範本 arm 資源識別碼。 | 字串 |
TemplateReferenceParameters (範本引用參數)
| 名字 | 描述 | 價值 |
|---|
TemplateWorkflowProfile
| 名字 | 描述 | 價值 |
|---|---|---|
| adoProvider配置檔 | 與工作流程相關聯的 GitHub 存放庫詳細數據。 | ADOProvider簡介 |
| deploymentTemplate | ADO OAuth 的屬性。 | 範本引用 |
| dockerfileTemplate | ADO OAuth 的屬性。 | 範本引用 |
| gitHubProvider簡介 | 與工作流程相關聯的 GitHub 存放庫和認證的詳細數據。 | GitHubProviderProfile |
| lastWorkflowRun | 工作流運行 | |
| manifestTemplates | 範本引用[] | |
| 拉取請求 | 包含工作流程的提取要求詳細數據。 | 拉取請求 |
| repositoryProvider | 針對使用者存放庫提交的提取要求狀態。 | '阿多' 'GitHub' |
| 工作流範本 | ADO OAuth 的屬性。 | 範本引用 |
TrackedResourceTags
| 名字 | 描述 | 價值 |
|---|
工作流屬性
| 名字 | 描述 | 價值 |
|---|---|---|
| artifactGenerationProperties | 產生 dockerfile 和指令清單等成品的屬性。 | ArtifactGenerationProperties |
| azurePipeline配置檔 | Azure 管線的配置檔。 | AzurePipelineProfile |
| githubWorkflowProfile | Github 工作流程的配置檔。 | GitHubWorkflowProfile |
| templateWorkflowProfile | 範本工作流程的配置檔。 | TemplateWorkflowProfile |
工作流運行
| 名字 | 描述 | 價值 |
|---|