This repository has been archived by the owner on Jan 19, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use a configuration file for default cloudformations settings
Currently we have some default settings coded into config.py. This change introduces the use of a configuration file to specify default settings for cloudformation. These settings are replaced by those placed into the project configuration files. In particular, this means that we can provide defaults for each environments seperately, putting less resources on dev environments than on prod. In this case we need substantial RDS instance types in prod to support defaulting to encryption. This is replicated across all environments. With this change we can set the dev environment to use no encryption and small instances as default.
- Loading branch information
Niall Creech
committed
Jun 16, 2016
1 parent
28eab2c
commit 5bd86a1
Showing
4 changed files
with
167 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
# Production is secure by default and may have high resource specifications | ||
prod: | ||
ec2: &prod_ec2 | ||
auto_scaling: &prod_ec2_auto_scaling | ||
desired: 2 | ||
max: 5 | ||
min: 1 | ||
parameters: &prod_ec2_parameters | ||
KeyName: default | ||
InstanceType: t2.micro | ||
block_devices: &prod_ec2_block_devices | ||
- DeviceName: /dev/sda1 | ||
VolumeSize: 20 | ||
rds: &prod_rds | ||
storage: 5 | ||
storage-type: 'gp2' | ||
backup-retention-period: 1 | ||
db-engine: 'postgres' | ||
db-engine-version: '9.3.5' | ||
instance-class: 'db.t2.large' | ||
multi-az: True | ||
storage-encrypted: True | ||
elasticache: &prod_elasticache | ||
clusters: 3 | ||
node_type: 'cache.m1.small' | ||
port: 6379 | ||
engine: 'redis' | ||
|
||
# Dev is not secure by default and has lower powered resource specifications | ||
dev: | ||
ec2: &dev_ec2 | ||
auto_scaling: &dev_ec2_auto_scaling | ||
desired: 1 | ||
max: 3 | ||
min: 1 | ||
parameters: &dev_ec2_parameters | ||
KeyName: default | ||
InstanceType: t2.micro | ||
block_devices: &dev_ec2_block_devices | ||
- DeviceName: /dev/sda1 | ||
VolumeSize: 20 | ||
rds: &dev_rds | ||
storage: 5 | ||
storage-type: 'gp2' | ||
backup-retention-period: 1 | ||
db-engine: 'postgres' | ||
db-engine-version: '9.3.5' | ||
instance-class: 'db.t2.small' | ||
multi-az: False | ||
storage-encrypted: False | ||
elasticache: &dev_elasticache | ||
clusters: 3 | ||
node_type: 'cache.m1.small' | ||
port: 6379 | ||
engine: 'redis' | ||
|
||
# Staging should be equivalent to prod | ||
staging: | ||
ec2: | ||
<<: *prod_ec2 | ||
rds: | ||
<<: *prod_rds | ||
elasticache: | ||
<<: *prod_elasticache | ||
|
||
# The default should be the most secure | ||
default: | ||
ec2: | ||
<<: *prod_ec2 | ||
rds: | ||
<<: *prod_rds | ||
elasticache: | ||
<<: *prod_elasticache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters