Skip to content

Commit

Permalink
Update README.md with exit codes
Browse files Browse the repository at this point in the history
  • Loading branch information
radykal-com committed Aug 14, 2016
1 parent 1c6aa09 commit b7cda86
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,13 @@ There are some special parameters that act different if present in a template:
### Troubleshooting
Run the script with _--Debug true_ to disable stack rollback on failure.

#### Error Exit Codes
- 11: Wrong application-name, the template file could not be found
- 12: Stack with same name already exists
- 50: Unexpected behaviour while trying to detect S3 bucket ownership
- 51: S3 bucket exists with the same name and you have no permissions over it


### Predefined tags
The following tags will be created automatically with each stack:
- application: the application name (template file name)
Expand Down
4 changes: 2 additions & 2 deletions create-stack.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@
print("Found template file for application: " + application)
except:
sys.stderr.write("Error: Unknown application (template file not found): " + application)
sys.exit(1)
sys.exit(11)

stackName = stack.create_stack_name(application, environment)
if stack.stack_exists(stackName, session):
sys.stderr.write("Error: Stack with name " + stackName + " already exists")
sys.exit(1)
sys.exit(12)

cfClient = session.client('cloudformation')
response = cfClient.validate_template(TemplateBody=templateContent)
Expand Down

0 comments on commit b7cda86

Please sign in to comment.