Azure - do not allow Arm template to modify existing resources

。_饼干妹妹 提交于 2019-12-03 15:51:06

The nature of Azure RM Templates is to be a declarative structure that defines how a solution should be deployed. If it finds something that isn't in the template it should, by the nature of what it does, change it to match the template.

You might be better converting your templates to Powershell scripts (or REST API calls) that way you can check the state prior to creating / amending details.

The other alternative would be to modify those parameters in a script before the template is called. So that you adjust the SQL Database to an S2 if that is what exists already.

I'd recommend against allowing manual changes via the portal (in prod environments).

Allowing changes to come both from Infrastructure As Code (IaC) and from the Azure portal defeats many of the purposes of IaC. IaC is intended not only to serve as a means of automation, but also documentation and idempotent control of your resources. If you're going to allow manual updates from the portal, your IaC will be constantly outdated and the value of maintaining it will be comparatively small.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!