CloudFormation 的 "create-change-set" 功能是否允许将计划与执行分开?

Does CloudFormation's "create-change-set" feature allow to separate planning from execution?

Terraform and AWS CloudFormation, one advantage generally associated with Terraform is the separation of planning (terraform plan) and execution (terraform apply)之间做出决定时。

我最近听说 CloudFormation 的 create-change-set 功能,描述为:

Creates a list of changes that will be applied to a stack so that you can review the changes before executing them.

在 AWS 文档的 Updating Stacks Using Change Sets 中,他们描述了推荐的更新过程。

现在我想知道:


背景:强调分离是一个重要优势的示例:

Official comparison on terraform.io:

Terraform also separates the planning phase from the execution phase, by using the concept of an execution plan. By running terraform plan, the current state is refreshed and the configuration is consulted to generate an action plan. The plan includes all actions to be taken: which resources will be created, destroyed or modified. It can be inspected by operators to ensure it is exactly what is expected. [...] Terraform lets operators apply changes with confidence, as they know exactly what will happen beforehand.

(可能已过时)Blog post from 2014 比较 Terraform 和 CloudFormation:

Infrastructure Updates: This is the absolute killer feature of Terraform. Terraform has a separate planning and execution phase. The planning phase shows which resources will be created, modified and destroyed. It gives you complete control of how your changes will affect the existing environment, which is quite crucial. This was one of the main reasons why we went ahead with Terraform. CloudFormation does not show you what changes it is going to make to the environment.

CloudFormation 变更集是一个类似于保存在计划文件中的 Terraform 计划的对象。它的核心功能是相同的:检查达到新的期望状态所需更改的报告,然后应用这些更改。

最初创建 Terraform 时,CloudFormation 没有此功能。您找到的文档在编写时是准确的,但是 the release of Change Sets 在这方面没有显着差异。

但是,官方比较中涵盖的其他差异仍然适用:

Terraform similarly uses configuration files to detail the infrastructure setup, but it goes further by being both cloud-agnostic and enabling multiple providers and services to be combined and composed. For example, Terraform can be used to orchestrate an AWS and OpenStack cluster simultaneously, while enabling 3rd-party providers like Cloudflare and DNSimple to be integrated to provide CDN and DNS services. This enables Terraform to represent and manage the entire infrastructure with its supporting services, instead of only the subset that exists within a single provider. It provides a single unified syntax, instead of requiring operators to use independent and non-interoperable tools for each platform and service.