0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

AWS CLI 〜CloudFormation編③〜

Posted at

はじめに

備忘録として、自分がよく使う&使ったaws-cliコマンドを書きます。
今回はCloudFormation編その3で、その1その2の補完verというか、まあ蛇足です。

注意

ドリフト作成

aws cloudformation detect-stack-drift --stack-name スタック名

なんとなくですが、ドリフト作成はcliの方が早い気がします。
しかしドリフトは、当時は(今も?)新機能だかベータ版ということで、私はあんまり信用してなかったです。
旧コンソールだとちゃんと表示されないこともあるとか、そういう話もサポートからうかがいました。

スタック削除保護変更

有効化

aws cloudformation update-termination-protection --stack-name スタック名 --enable-termination-protection

無効化

aws cloudformation update-termination-protection --stack-name スタック名 --no-enable-termination-protection

有効状態で有効化コマンド、無効状態無効化でコマンドを叩いたとしても、エラーにはならないです。
しかし何故「--disable-termination-protection」ではないのでしょうね〜。

スタック削除

aws cloudformation delete-stack --stack-name スタック名

スタック削除しても、どんなスタックだったかは確認できるのが便利ですね!

おわりに

ゼロベースでCloudFormationの検証を始め、どうなることかと思いましたが、無事運用に載せるまでできました ^^
またCloudFormation担当のAWSサポートの方は、特に的確な回答をいただけると実感していた日々でございました。
ということで、当時使っていたCloudFormationのコマンドはこんな感じでした!

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?