From f9b77c282fff6c33a65d9ace3910f6a437585049 Mon Sep 17 00:00:00 2001 From: Kurtis Hanson Date: Tue, 16 May 2023 18:16:18 +0100 Subject: [PATCH] aws-cloudformation: add page (#10116) * aws-cloudformation: add page --------- Co-authored-by: K.B.Dharun Krishna --- pages/common/aws-cloudformation.md | 32 ++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 pages/common/aws-cloudformation.md diff --git a/pages/common/aws-cloudformation.md b/pages/common/aws-cloudformation.md new file mode 100644 index 0000000000..38f5b9bc83 --- /dev/null +++ b/pages/common/aws-cloudformation.md @@ -0,0 +1,32 @@ +# aws cloudformation + +> Model, provision, and manage AWS and third-party resources by treating infrastructure as code. +> More information: . + +- Create a stack from a template file: + +`aws cloudformation create-stack --stack-name {{stack-name}} --region {{region}} --template-body {{file://path/to/file.yml}} --profile {{profile}}` + +- Delete a stack: + +`aws cloudformation delete-stack --stack-name {{stack-name}} --profile {{profile}}` + +- List all stacks: + +`aws cloudformation list-stacks --profile {{profile}}` + +- List all running stacks: + +`aws cloudformation list-stacks --stack-status-filter CREATE_COMPLETE --profile {{profile}}` + +- Check the status of a stack: + +`aws cloudformation describe-stacks --stack-name {{stack-id}} --profile {{profile}}` + +- Initiate drift detection for a stack: + +`aws cloudformation detect-stack-drift --stack-name {{stack-id}} --profile {{profile}}` + +- Check the drift status output of a stack using 'StackDriftDetectionId' from the previous command output: + +`aws cloudformation describe-stack-resource-drifts --stack-name {{stack-drift-detection-id}} --profile {{profile}}`