简体   繁体   English

Azure ARM模板部署是事务性的吗?

[英]Is Azure ARM Template deployment transactional?

Lets say I'm deploying an Azure VM by scripting which requires multiple resources interdependent on one another. 假设我正在通过脚本部署Azure VM,这需要多个资源相互依赖。

Lets say a NIC fails, 让我们说一个NIC失败,

  1. Does the deployment script still go through to the deployment of the VM? 部署脚本是否仍然可以部署到VM? So that I have a VM with no NIC 所以我有一个没有NIC的VM
  2. Does it fail rolling back the entire script? 它是否无法回滚整个脚本?

No ARM templates are not executed within a transaction. 事务中不执行任何ARM模板。

  1. It's possible that you have deployed resources without deploying the whole ARM template. 您可以在不部署整个ARM模板的情况下部署资源。 In your case it's not possible to have a VM without a NIC (But you test the deployment of the ARM template and make it work at the end.) 在您的情况下,不可能有没有NIC的VM(但是您测试了ARM模板的部署并使其最终工作。)
  2. It does not roll back. 它不会回滚。

I think now they have added "--rollback-on-error" flag to rollback on last successful deployment if the deployment fails. 我认为现在他们已经添加了“--rollback-on-error”标志,以便在部署失败时在上次成功部署时回滚。 Also you can specify the name of the deployment to which you need to roll back refer this: https://docs.microsoft.com/en-us/cli/azure/group/deployment?view=azure-cli-latest#commands . 您还可以指定需要回滚的部署的名称,请参阅: https//docs.microsoft.com/en-us/cli/azure/group/deployment?view = azure-cli-latest #commands

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM