Microsoft/Azure

Azure Resource Manager 배포 모드 (Deployment mode)

megapain 2022. 6. 25. 17:13

참고 자료

https://docs.microsoft.com/en-us/azure/azure-resource-manager/templates/deployment-modes

 

 

증분(Incremental) 모드 (기본 값)

- Template에 지정되지 않은 기존 리소스 : 변경없이 유지

- Template에 지정된 기존 리소스 : 새 속성값으로 업데이트

 

 

전체(Complete) 모드

- Template에 지정되지 않은 기존 리소스 : 삭제

- Template에 지정된 기존 리소스 : 새 속성값으로 업데이트

 

 

예제

Resource Group contains:

  • Resource A
  • Resource B
  • Resource C


Template contains:

  • Resource A
  • Resource B
  • Resource D


When deployed in incremental mode, the resource group has:

  • Resource A
  • Resource B
  • Resource C
  • Resource D


When deployed in complete mode, Resource C is deleted. The resource group has:

  • Resource A
  • Resource B
  • Resource D

 

Important
When redeploying an existing resource in incremental mode, all properties are reapplied.
The properties aren't incrementally added.
A common misunderstanding is to think properties that aren't specified in the template are left unchanged.
If you don't specify certain properties, Resource Manager interprets the deployment as overwriting those values.
Properties that aren't included in the template are reset to the default values.
Specify all non-default values for the resource, not just the ones you're updating.
The resource definition in the template always contains the final state of the resource.
It can't represent a partial update to an existing resource.