cfn-execute-change-set

A tool for reviewing and executing AWS CloudFormation change sets.

A command line tool for reviewing and executing AWS CloudFormation change sets.

Features

  • Read CloudFormation change set ARN from stdin or from the command line
  • Print a summary of changes to stack resources, parameters and tags
  • View the chain of causes that leads to resource changes (experimental)
  • Review changes and execute them right away

Note: Resource change cause chains are experimental and might not be fully accurate. Always review the raw change set input if you are unsure how changes propagate to resources.

Installation

npm i -g cfn-execute-change-set

Usage

To review and execute a changeset, just pipe the output of the AWS CLI create-change-set command to the cfn-execute-change-set tool:

aws cloudformation create-change-set [...] | cfn-execute-change-set

Piping the output of aws cloudformation deploy --no-execute-change-set is also supported.

Alternatively, you can provide a CloudFormation change set ARNs as command line argument:

cfn-execute-change-set \
    arn:aws:cloudformation:eu-west-1:123456789123:changeSet/test-1516522726/9957ed5e-0049-4144-bc82-962941d972e4

Example

$ aws cloudformation create-change-set [] | cfn-execute-change-set
{
    "StackId": "arn:aws:cloudformation:eu-west-1:748888633826:stack/ew1-test/e0496e10-fe10-11e7-8420-50fae9b818d2",
    "Id": "arn:aws:cloudformation:eu-west-1:748888633826:changeSet/test-1516540773/0e3d729c-9712-43aa-a7d3-2b44e4d2b797"
}
Changeset is being created. Waiting...
Changeset is being created. Waiting...
Resource Changes
[*] AuthenticatorLambda - ew1-test-AuthenticatorLambda-113XFFG3TVL7D (AWS::Lambda::Function)
    - resource tags changed
        caused by changed stack tags
[*] DataBucket - cfn-execute-changeset-test-1 (AWS::S3::Bucket)
    - resource tags changed
        caused by changed stack tags
[*] FirehoseDeliveryStream - ew1-test-FirehoseDeliveryStream-115L2LE9AKCXP (AWS::KinesisFirehose::DeliveryStream) [Replacement: Conditional]
    - resource property ExtendedS3DestinationConfiguration might change [Recreation: Always]
        caused by changed output value of AuthenticatorLambda.Arn
        caused by changed stack tags

Tag Changes
[*] Another: test1 ⟶ test

Execute change set [y/N]? y
Stack update started:
- Change Set ARN: arn:aws:cloudformation:eu-west-1:748888633826:changeSet/test-1516540773/0e3d729c-9712-43aa-a7d3-2b44e4d2b797
- Stack ARN: arn:aws:cloudformation:eu-west-1:748888633826:stack/ew1-test/e0496e10-fe10-11e7-8420-50fae9b818d2

Development

Integration Test

The test suite includes an integration test that calls live AWS APIs. The integration test requires valid AWS credentials that are allowed to

  • Create, Describe and Delete CloudFormation stacks
  • Create and Describe change sets
  • Create, Delete and Update SNS topics (used as sample resource)

If the AWS SDK cannot find valid AWS credentials, the integration test is skipped. If the SDK finds credentials which cannot perform these operations, the integration test will fail.

Ideas

  • Support change sets that import resources.

Repository

sjakthol/cfn-execute-change-set


上一篇:cfn-monitor
下一篇:bbook

相关推荐

  • (独家!)webpack 5 changelog 全文翻译

    ★ webpack 团队于北京时间 10 月 12 日凌晨发布了 v5.0.0-beta.0 版本,本文译自 webpack/changelog-v5。此部分主要面向非插件开发的 webpack 使...

    1 年前
  • 页面可见与不可见的事件——visibilitychange

    需求背景 在最近的项目中,使用了transition和定时器实现了随机走动物体的功能,走动的物体还会有animation的动画。我发现在手机中,按home键或者切换应用,使页面不在屏幕中,也就是页面不...

    1 年前
  • 谷歌地图事件bounds_changed多次触发拖动时

    Matthieu Napoli提出了一个问题:Google Map event bounds_changed triggered multiple times when dragging,或许与您遇到...

    2 年前
  • 规范 commit 与 changelog 生成

    一个良好的提交习惯,绝对会为以后的代码维护带来不小的收益。 举个例子,某天你自己写的一个功能出问题了,找到代码被修改的地方,发现是一个同事修改了一行代码,这个时候你一脸懵逼,因为他既没有写注释,com...

    2 年前
  • 获得价值从HTML复选框/ onchange事件onclick

    Mark AmeryMaxim Gershkovich提出了一个问题:Getting value of HTML Checkbox from onclick/onchange events,或许与您遇...

    3 年前
  • 简单谈谈gulp-changed插件

    前言 gulp-changed插件的作用,是用来过滤未被修改过的文件,只有修改后的文件才能通过管道。这样做的好处时,只处理修改后的文件,减少后续程序的执行时间。 根据官方给出的例子: const SR...

    4 年前
  • 每日一道算法题 - LetterChanges(easy-4)

    规则 Using the JavaScript language, have the function LetterChanges(str) take the str parameter being ...

    2 年前
  • 更改哈希不触发hashchange事件

    SystemicPlural提出了一个问题:Change hash without triggering a hashchange event,或许与您遇到的问题类似。

    2 年前
  • 按回车键后,调用OnChange事件

    Amr ElgarhyBill Lumbert提出了一个问题:to call onChange event after pressing Enter key,或许与您遇到的问题类似。

    3 年前
  • 我怎么能触发onchange事件手动?[重复]

    XaqronCodeTweetie提出了一个问题:How can I trigger an onchange event manually? [duplicate],或许与您遇到的问题类似。

    3 年前

官方社区

扫码加入 JavaScript 社区