https://github.com/stelligent/empty-stack
Creating an empty stack in cloudformation to reduce the errors on creation.
https://github.com/stelligent/empty-stack
Last synced: about 1 year ago
JSON representation
Creating an empty stack in cloudformation to reduce the errors on creation.
- Host: GitHub
- URL: https://github.com/stelligent/empty-stack
- Owner: stelligent
- License: mit
- Created: 2020-08-11T14:35:01.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2022-02-21T16:05:48.000Z (over 4 years ago)
- Last Synced: 2025-03-24T05:26:40.962Z (about 1 year ago)
- Language: Python
- Size: 16.6 KB
- Stars: 4
- Watchers: 7
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# empty-stack
This repository was created to support a blog article about removing errors on CloudFormation stack creation.
By creating a stack with no infrastructure (an empty stack), then updating the stack with infrastructure, the stack will never be in a state where a stack cannot be updated. Thus, all errors are moved from the creation process to the update process, which currently has a much more robust rollback process.
The `slt.sh` file is to assist with linting and security best practices. `slt` stands for Scan and Lint Template.
## Installation
Download requirements:
```
pip install -r requirements.txt
```
## Example usage
Example usage without parameters file:
```
python3 empty_stack.py --name test-vpc --template vpc.yaml
```
Example usage with parameters file:
```
python3 empty_stack.py --name test-vpc --template vpc.yaml --parameters params.json
```
Example usage to just create the stack without infrastructure:
```
python3 empty_stack.py --name test-vpc
```
Example usage with iam capabilites required:
```
python3 empty_stack.py --name test-vpc --template vpc.yaml --iam
```
Example usage with aws-vault:
```
aws-vault exec your_profile -- python3 empty_stack.py --name test-vpc
```
## Further documentation
* Please see [boto3's documentation](https://boto3.amazonaws.com/v1/documentation/api/latest/guide/configuration.html) on where credentials are pulled from.
* cfn-lint: [github](https://github.com/aws-cloudformation/cfn-python-lint)
* cfn_nag: [github](https://github.com/stelligent/cfn_nag) and [blog article](https://stelligent.com/2018/03/23/validating-aws-cloudformation-templates-with-cfn_nag-and-mu/)