다음을 통해 공유


AzureResourceManagerTemplateDeployment@3 - ARM 템플릿 배포 v3 작업

이 작업을 사용하여 ARM(Azure Resource Manager) 템플릿을 모든 배포 범위에 배포합니다.

Syntax

# ARM template deployment v3
# Deploy an Azure Resource Manager (ARM) template to all the deployment scopes.
- task: AzureResourceManagerTemplateDeployment@3
  inputs:
  # Azure Details
    deploymentScope: 'Resource Group' # 'Management Group' | 'Subscription' | 'Resource Group'. Required. Deployment scope. Default: Resource Group.
    azureResourceManagerConnection: # string. Alias: ConnectedServiceName. Required. Azure Resource Manager connection. 
    #subscriptionId: # string. Alias: subscriptionName. Required when deploymentScope != Management Group. Subscription. 
    #action: 'Create Or Update Resource Group' # 'Create Or Update Resource Group' | 'DeleteRG'. Required when deploymentScope = Resource Group. Action. Default: Create Or Update Resource Group.
    #resourceGroupName: # string. Required when deploymentScope = Resource Group. Resource group. 
    #location: # string. Required when action = Create Or Update Resource Group || deploymentScope != Resource Group. Location. 
  # Template
    #templateLocation: 'Linked artifact' # 'Linked artifact' | 'URL of the file'. Required when action = Create Or Update Resource Group || deploymentScope != Resource Group. Template location. Default: Linked artifact.
    #csmFileLink: # string. Required when templateLocation = URL of the file && action = Create Or Update Resource Group || deploymentScope != Resource Group. Template link. 
    #csmParametersFileLink: # string. Optional. Use when templateLocation = URL of the file && action = Create Or Update Resource Group || deploymentScope != Resource Group. Template parameters link. 
    #csmFile: # string. Required when templateLocation = Linked artifact && action = Create Or Update Resource Group || deploymentScope != Resource Group. Template. 
    #csmParametersFile: # string. Optional. Use when templateLocation = Linked artifact && action = Create Or Update Resource Group || deploymentScope != Resource Group. Template parameters. 
    #overrideParameters: # string. Optional. Use when action = Create Or Update Resource Group || deploymentScope != Resource Group. Override template parameters. 
    #deploymentMode: 'Incremental' # 'Incremental' | 'Complete' | 'Validation'. Required when action = Create Or Update Resource Group || deploymentScope != Resource Group. Deployment mode. Default: Incremental.
  # Advanced
    #deploymentName: # string. Optional. Use when action = Create Or Update Resource Group || deploymentScope != Resource Group. Deployment name. 
    #deploymentOutputs: # string. Optional. Use when action = Create Or Update Resource Group || deploymentScope != Resource Group. Deployment outputs. 
    #addSpnToEnvironment: false # boolean. Optional. Use when action = Create Or Update Resource Group || deploymentScope != Resource Group. Access service principal details in override parameters. Default: false.
    #useWithoutJSON: false # boolean. Optional. Use when action = Create Or Update Resource Group || deploymentScope != Resource Group. Use individual output values without JSON.Stringify applied. Default: false.
# ARM template deployment v3
# Deploy an Azure Resource Manager (ARM) template to all the deployment scopes.
- task: AzureResourceManagerTemplateDeployment@3
  inputs:
  # Azure Details
    deploymentScope: 'Resource Group' # 'Management Group' | 'Subscription' | 'Resource Group'. Required. Deployment scope. Default: Resource Group.
    azureResourceManagerConnection: # string. Alias: ConnectedServiceName. Required. Azure Resource Manager connection. 
    #subscriptionId: # string. Alias: subscriptionName. Required when deploymentScope != Management Group. Subscription. 
    #action: 'Create Or Update Resource Group' # 'Create Or Update Resource Group' | 'DeleteRG'. Required when deploymentScope = Resource Group. Action. Default: Create Or Update Resource Group.
    #resourceGroupName: # string. Required when deploymentScope = Resource Group. Resource group. 
    #location: # string. Required when action = Create Or Update Resource Group || deploymentScope != Resource Group. Location. 
  # Template
    #templateLocation: 'Linked artifact' # 'Linked artifact' | 'URL of the file'. Required when action = Create Or Update Resource Group || deploymentScope != Resource Group. Template location. Default: Linked artifact.
    #csmFileLink: # string. Required when templateLocation = URL of the file && action = Create Or Update Resource Group || deploymentScope != Resource Group. Template link. 
    #csmParametersFileLink: # string. Optional. Use when templateLocation = URL of the file && action = Create Or Update Resource Group || deploymentScope != Resource Group. Template parameters link. 
    #csmFile: # string. Required when templateLocation = Linked artifact && action = Create Or Update Resource Group || deploymentScope != Resource Group. Template. 
    #csmParametersFile: # string. Optional. Use when templateLocation = Linked artifact && action = Create Or Update Resource Group || deploymentScope != Resource Group. Template parameters. 
    #overrideParameters: # string. Optional. Use when action = Create Or Update Resource Group || deploymentScope != Resource Group. Override template parameters. 
    #deploymentMode: 'Incremental' # 'Incremental' | 'Complete' | 'Validation'. Required when action = Create Or Update Resource Group || deploymentScope != Resource Group. Deployment mode. Default: Incremental.
  # Advanced
    #deploymentName: # string. Optional. Use when action = Create Or Update Resource Group || deploymentScope != Resource Group. Deployment name. 
    #deploymentOutputs: # string. Optional. Use when action = Create Or Update Resource Group || deploymentScope != Resource Group. Deployment outputs. 
    #addSpnToEnvironment: false # boolean. Optional. Use when action = Create Or Update Resource Group || deploymentScope != Resource Group. Access service principal details in override parameters. Default: false.

입력

deploymentScope - 배포 scope
string. 필수 요소. 허용되는 값: Management Group, Subscription, Resource Group. 기본값은 Resource Group입니다.

배포의 scope. 배포 범위에 대해 자세히 알아봅니다.


azureResourceManagerConnection - Azure Resource Manager 연결
입력 별칭: ConnectedServiceName. string. 필수 요소.

선택한 배포 scope 대한 액세스 권한이 있는 Azure Resource Manager 서비스 연결을 지정합니다.


subscriptionId - 구독
입력 별칭: subscriptionName. string. 필요한 경우 deploymentScope != Management Group입니다.

Azure 구독을 지정합니다.

중요

지정된 값은 구독 이름이 아닌 구독 ID여야 합니다.


action - 작업
string. 필요한 경우 deploymentScope = Resource Group입니다. 허용되는 값: Create Or Update Resource Group, DeleteRG (리소스 그룹 삭제). 기본값은 Create Or Update Resource Group입니다.

Azure 리소스 또는 리소스 그룹에서 수행할 작업입니다.


resourceGroupName - 리소스 그룹
string. 필요한 경우 deploymentScope = Resource Group입니다.

리소스 그룹의 이름을 제공합니다.


location - 위치
string. 필요한 경우 action = Create Or Update Resource Group || deploymentScope != Resource Group입니다.

리소스 그룹 배포 범위: 리소스 그룹을 배포할 위치입니다. 리소스 그룹이 Azure 구독에 이미 있는 경우 이 값은 무시됩니다. 기타 배포 범위: 배포 메타데이터를 저장할 위치입니다.


templateLocation - 템플릿 위치
string. 필요한 경우 action = Create Or Update Resource Group || deploymentScope != Resource Group입니다. 허용되는 값: Linked artifact, URL of the file. 기본값은 Linked artifact입니다.

템플릿 및 매개 변수 JSON 파일의 위치입니다. 파일이 연결된 코드/빌드 아티팩 트 중 일부인 경우 연결된 아티팩트를 선택합니다. 연결된 아티팩트에서 Bicep 파일의 경로를 지정할 수도 있습니다. JSON 파일이 공개적으로 액세스할 수 있는 http/https URL에 있는 경우 파일의 URL 을 선택합니다. 프라이빗 스토리지 계정에 저장된 파일을 사용하려면 템플릿의 URL에 SAS(공유 액세스 서명) 토큰을 검색하고 포함합니다. 예: <blob_storage_url>/template.json?. 스토리지 계정에 매개 변수 파일을 업로드하고 SAS 토큰을 생성하려면 Azure 파일 복사 작업을 사용하거나 PowerShell 또는 Azure CLI를 사용하여 단계를 수행할 수 있습니다.


csmFileLink - 템플릿 링크
string. 필요한 경우 templateLocation = URL of the file && action = Create Or Update Resource Group || deploymentScope != Resource Group입니다.

템플릿 파일의 URL을 지정합니다. 예제 URL: https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/101-vm-simple-windows/azuredeploy.json

프라이빗 스토리지 계정에 저장된 템플릿을 배포하려면 템플릿의 URL에 SAS(공유 액세스 서명) 토큰을 검색하고 포함합니다. 예: <blob_storage_url>/template.json?<SAStoken>. 템플릿 파일(또는 연결된 템플릿)을 스토리지 계정에 업로드하고 SAS 토큰을 생성하려면 Azure 파일 복사 작업을 사용하거나 PowerShell 또는 Azure CLI를 사용하여 단계를 수행합니다.

그리드에서 템플릿 매개 변수를 보려면 템플릿 매개 변수 재정의 텍스트 상자 옆에 있는 를 클릭합니다 ... . 이 기능을 사용하려면 소스에서 CORS 규칙을 사용해야 합니다. 템플릿이 Azure Storage Blob에 있는 경우 원본 간 리소스 공유 를 참조하여 CORS를 사용하도록 설정합니다.


csmParametersFileLink - 템플릿 매개 변수 링크
string. 선택 사항입니다. 을 사용할 때 templateLocation = URL of the file && action = Create Or Update Resource Group || deploymentScope != Resource Group사용합니다.

매개 변수 파일의 URL을 지정합니다. 예제 URL: https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/101-vm-simple-windows/azuredeploy.parameters.json

프라이빗 스토리지 계정에 저장된 파일을 사용하려면 템플릿의 URL에 SAS(공유 액세스 서명) 토큰을 검색하고 포함합니다. 예: <blob_storage_url>/template.json?<SAStoken>. 템플릿 파일(또는 연결된 템플릿)을 스토리지 계정에 업로드하고 SAS 토큰을 생성하려면 Azure 파일 복사 작업을 사용하거나 PowerShell 또는 Azure CLI를 사용하여 단계를 수행합니다.

그리드에서 템플릿 매개 변수를 보려면 템플릿 매개 변수 재정의 ... 텍스트 상자 옆을 클릭합니다. 이 기능을 사용하려면 소스에서 CORS 규칙을 사용해야 합니다. 템플릿이 Azure Storage Blob에 있는 경우 원본 간 리소스 공유 를 참조하여 CORS를 사용하도록 설정합니다.


csmFile - 템플릿
string. 필요한 경우 templateLocation = Linked artifact && action = Create Or Update Resource Group || deploymentScope != Resource Group입니다.

Azure Resource Manager 템플릿을 가리키는 경로 또는 패턴을 지정합니다. Azure Resource Manager 템플릿에 대해 자세히 알아보세요. 즉시 시작하려면 이 샘플 템플릿을 사용합니다. Azure CLI 버전 > 2.20.0인 경우 Bicep 파일을 지원합니다.


csmParametersFile - 템플릿 매개 변수
string. 선택 사항입니다. 을 사용할 때 templateLocation = Linked artifact && action = Create Or Update Resource Group || deploymentScope != Resource Group사용합니다.

Azure Resource Manager 템플릿의 매개 변수 파일을 가리키는 경로 또는 패턴을 지정합니다. Azure CLI 버전 > 2.47.0인 경우 Bicep Param 파일을 지원합니다.


overrideParameters - 템플릿 매개 변수 재정의
string. 선택 사항입니다. 을 사용할 때 action = Create Or Update Resource Group || deploymentScope != Resource Group사용합니다.

재정의할 템플릿 매개 변수를 지정합니다.

그리드에서 템플릿 매개 변수를 보려면 매개 변수 재정의 텍스트 상자 옆에 있는 를 클릭합니다 ... . 이 기능을 사용하려면 소스에서 CORS 규칙을 사용해야 합니다. 템플릿이 Azure Storage Blob에 있는 경우 이 문자열을 참조하여 CORS를 사용하도록 설정하거나 텍스트 상자에 재정의할 템플릿 매개 변수를 입력합니다.

예: -storageName fabrikam -adminUsername $(vmusername) -adminPassword (ConvertTo-SecureString -String '$(password)' -AsPlainText -Force) -azureKeyVaultName $(fabrikamFibre).

매개 변수 값에 여러 단어가 있는 경우 변수를 사용하여 값을 전달하는 경우에도 단어를 따옴표로 묶습니다. -name "parameter value" -name2 "$(var)")을 입력합니다. 개체 형식 매개 변수를 재정의하려면 문자열화된 JSON 개체를 사용합니다. -options ["option1"] -map {"key1": "value1" })을 입력합니다.


deploymentMode - 배포 모드
string. 필요한 경우 action = Create Or Update Resource Group || deploymentScope != Resource Group입니다. 허용되는 값: Incremental, Complete, Validation (유효성 검사에만 해당). 기본값은 Incremental입니다.

모드는 Incremental 배포를 리소스 그룹에 대한 증분 업데이트로 처리합니다. 리소스 그룹에 있지만 템플릿에 지정되지 않은 변경되지 않은 리소스를 남깁니다.

Complete mode는 템플릿에 없는 리소스를 삭제합니다. 전체 모드는 증분 모드보다 비교적 많은 시간이 걸립니다. 작업 시간이 초과되면 시간 제한을 늘리거나 모드로 변경하는 것이 Incremental 좋습니다.

경고

전체 모드는 템플릿에 지정되지 않은 리소스 그룹의 모든 기존 리소스를 삭제합니다. 배포하려는 리소스 그룹에 템플릿에 지정되지 않은 필요한 리소스가 포함되어 있지 않은지 검토합니다. Validate mode를 사용하면 실제 리소스를 만들기 전에 템플릿 문제를 찾을 수 있습니다.

참고

이 모드는 Validate 리소스가 배포되지 않더라도 항상 리소스 그룹을 만듭니다. 배포 모드에 대해 자세히 알아봅니다.


deploymentName - 배포 이름
string. 선택 사항입니다. 를 사용하는 경우 action = Create Or Update Resource Group || deploymentScope != Resource Group를 사용합니다.

만들 리소스 그룹 배포의 이름을 지정합니다.


deploymentOutputs - 배포 출력
string. 선택 사항입니다. 를 사용하는 경우 action = Create Or Update Resource Group || deploymentScope != Resource Group를 사용합니다.

현재 배포 개체의 출력 섹션을 문자열 형식으로 포함하는 출력 변수의 변수 이름을 제공합니다. PowerShell cmdlet을 ConvertFrom-Json 사용하여 JSON 개체를 구문 분석하고 개별 출력 값에 액세스할 수 있습니다. 배포 출력에 대해 자세히 알아봅니다.


addSpnToEnvironment - 재정의 매개 변수의 서비스 주체 세부 정보에 액세스
boolean. 선택 사항입니다. 를 사용하는 경우 action = Create Or Update Resource Group || deploymentScope != Resource Group를 사용합니다. 기본값은 false입니다.

스크립트의 실행 환경으로 선택한 Azure 엔드포인트의 서비스 주체 ID와 키를 추가합니다. 및 변수는 $servicePrincipalId$servicePrincipalKey 과 같은 -key $servicePrincipalKey재정의 매개 변수에 있을 수 있습니다.


useWithoutJSON - JSON 없이 개별 출력 값을 사용합니다. Stringify 적용됨
boolean. 선택 사항입니다. 를 사용하는 경우 action = Create Or Update Resource Group || deploymentScope != Resource Group를 사용합니다. 기본값은 false입니다.

개별 출력 값은 JSON을 통해 변환됩니다. 기본적으로 Stringify. 출력 값을 JSON을 통해 변환하지 않고 그대로 사용하려는 경우 Stringify, 이 옵션을 사용하도록 설정합니다. 자세한 내용은 이를 참조하세요.


작업 제어 옵션

모든 작업에는 작업 입력 외에 제어 옵션이 있습니다. 자세한 내용은 컨트롤 옵션 및 일반적인 작업 속성을 참조하세요.

출력 변수

없음

설명

참고

이 작업은 Azure CLI 버전 > 2.20.0일 때 Bicep 파일을 지원합니다.

  • 모든 배포 범위에서 배포에 대한 지원이 추가되었습니다.
    • 모든 VM 관련 작업을 제거했습니다.

요구 사항

요구 사항 Description
파이프라인 유형 YAML, 클래식 빌드, 클래식 릴리스
실행 중 에이전트, DeploymentGroup
요청 없음
Capabilities 이 작업은 작업의 후속 작업에 대한 요구를 충족하지 않습니다.
명령 제한 사항 모두
Settable 변수 모두
에이전트 버전 2.119.1 이상
작업 범주 배포