This repository has been archived by the owner on Jan 19, 2022. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #209 from ministryofjustice/set_rds_defaults
Use a configuration file for default cloudformations settings
- Loading branch information
Showing
7 changed files
with
350 additions
and
54 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: 30 | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
prod: | ||
rds: | ||
db-master-password: testpassword |
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,50 @@ | ||
prod: | ||
ec2: | ||
tags: | ||
Apps: test | ||
security_groups: | ||
AnotherSG: | ||
- IpProtocol: tcp | ||
FromPort: 443 | ||
ToPort: 443 | ||
SourceSecurityGroupName: | ||
Ref: BaseHostSG | ||
BaseHostSG: | ||
- IpProtocol: tcp | ||
FromPort: 22 | ||
ToPort: 22 | ||
CidrIp: 0.0.0.0/0 | ||
- IpProtocol: tcp | ||
FromPort: 80 | ||
ToPort: 80 | ||
CidrIp: 0.0.0.0/0 | ||
elb: | ||
- name: test-dev-external | ||
hosted_zone: kyrtest.pf.dsd.io. | ||
scheme: internet-facing | ||
listeners: | ||
- LoadBalancerPort: 80 | ||
InstancePort: 80 | ||
Protocol: TCP | ||
- LoadBalancerPort: 443 | ||
InstancePort: 443 | ||
Protocol: TCP | ||
s3: {} | ||
rds: | ||
db-name: test | ||
db-master-username: testuser | ||
elasticache: {} | ||
ssl: | ||
my-cert: | ||
cert: | | ||
-----BEGIN CERTIFICATE----- | ||
blahblahblah | ||
-----END CERTIFICATE----- | ||
key: | | ||
-----BEGIN RSA PRIVATE KEY----- | ||
blahblahblah | ||
-----END RSA PRIVATE KEY----- | ||
chain: | | ||
-----BEGIN CERTIFICATE----- | ||
blahblahblah | ||
-----END CERTIFICATE----- |
Oops, something went wrong.