Skip to content

Commit 7921d9a

Browse files
committed
Update CHANGELOG
1 parent a73ddbc commit 7921d9a

File tree

3 files changed

+47
-1
lines changed

3 files changed

+47
-1
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@
1212

1313
### Pending Release
1414

15+
### v2.5.0
16+
17+
- :rocket: Add top level KMS Key for encrypting logs & performance metrics
18+
1519
### v2.4.0
1620

1721
- :rocket: Associate self with myApplication

cloudformation/lib/kms.js

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
import cf from '@openaddresses/cloudfriend';
2+
3+
export default {
4+
Resources: {
5+
KMSAlias: {
6+
Type: 'AWS::KMS::Alias',
7+
Properties: {
8+
AliasName: cf.join(['alias/', cf.stackName]),
9+
TargetKeyId: cf.ref('KMS')
10+
}
11+
},
12+
KMS: {
13+
Type: 'AWS::KMS::Key',
14+
Properties: {
15+
Description: 'Used to encrypt logs & metrics related to platform operations',
16+
Enabled: true,
17+
EnableKeyRotation: false,
18+
KeyPolicy: {
19+
Id: cf.stackName,
20+
Statement: [{
21+
Effect: 'Allow',
22+
Principal: {
23+
AWS: cf.join(['arn:', cf.partition, ':iam::', cf.accountId, ':root'])
24+
},
25+
Action: ['kms:*'],
26+
Resource: '*'
27+
}]
28+
}
29+
}
30+
},
31+
},
32+
Outputs: {
33+
KMS: {
34+
Description: 'KMS',
35+
Export: {
36+
Name: cf.join([cf.stackName, '-kms'])
37+
},
38+
Value: cf.getAtt('KMS', 'Arn')
39+
}
40+
}
41+
};

cloudformation/vpc.template.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import cf from '@openaddresses/cloudfriend';
22
import VPC from './lib/vpc.js';
3+
import KMS from './lib/kms.js';
34
import Connect from './lib/connect.js';
45
import ELBLogs from './lib/elb-logs.js';
56
import ECSCluster from './lib/ecs-cluster.js';
@@ -66,4 +67,4 @@ export default cf.merge({
6667
Value: cf.ref('HostedZoneID')
6768
}
6869
}
69-
}, VPC, Connect, ELBLogs, ECSCluster);
70+
}, VPC, KMS, Connect, ELBLogs, ECSCluster);

0 commit comments

Comments
 (0)