gpt4 book ai didi

amazon-web-services - AWS : How does CloudFormation know a template has been deployed?

转载 作者:行者123 更新时间:2023-12-03 07:31:53 26 4
gpt4 key购买 nike

在此article ,有关于 CloudFormation 的很好的解释。

If you don’t know CloudFormation, then it’s important to know that CloudFormation is the Infrastructure as Code (IaC) solution of AWS. It is in the same category of tools as Terraform (a very good comparison between CloudFormation and Terraform can be found here).

With CloudFormation you can declaratively specify the AWS infrastructure that you need for your cloud application in a YAML or JSON file, called a template, and then deploy this template. During the deployment, AWS automatically provisions all the resources that you specified in your template.

If you already deployed before and just made changes to your template, then AWS calculates a changeset and applies it, so that the state of your infrastructure matches your the specification (just like Kubernetes).

想象一下以下场景:

  1. 创建一个新项目并为此项目设置 CloudFormation 模板。
  2. 已成功部署此模板。
  3. 然后,更改代码。
  4. 再次部署。

就第 4 步而言,CloudFormation 如何知道该堆栈之前已创建,并对其进行更新?

模板中是否有唯一的UUID来标识与该模板相关的所有资源?

最佳答案

标识符是您在使用create-stack部署模板时指定的堆栈名称。命令,因为它在您创建堆栈的区域中应该是唯一的。

关于amazon-web-services - AWS : How does CloudFormation know a template has been deployed?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59645741/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com