Skip to content

Commit be22559

Browse files
authored
Merge pull request #2930 from guardian/changeset-release/main
🦋 Release package updates
2 parents 435d3f6 + 978f09f commit be22559

5 files changed

Lines changed: 57 additions & 72 deletions

File tree

.changeset/famous-laws-sneeze.md

Lines changed: 0 additions & 6 deletions
This file was deleted.

.changeset/sweet-chicken-travel.md

Lines changed: 0 additions & 8 deletions
This file was deleted.

.changeset/violet-pigs-rule.md

Lines changed: 0 additions & 57 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,61 @@
11
# @guardian/cdk
22

3+
## 64.0.0
4+
5+
### Major Changes
6+
7+
- d880b52: Implement `GuParameterStoreReadPolicy` as a singleton to support `GuLoadBalancedAppExperimental` instantiating it once for the EC2 app and once for the ECS app.
8+
The result is a single `AWS::IAM::Policy` resource in the CloudFormation template, which is attached to both the EC2 and ECS roles, keeping the diff small.
9+
10+
A [GitHub search](https://github.com/search?q=org%3Aguardian+GuParameterStoreReadPolicy+NOT+repo%3Aguardian%2Fcdk++NOT+is%3Aarchived&type=code) shows `GuParameterStoreReadPolicy` is never directly instantiated by clients.
11+
12+
- 348cc70: Removes the `roleConfiguration` property when instantiating a `GuEc2App` or `GuLoadBalancedAppExperimental` in favour of declaring `additionalPolicies` as a top level property.
13+
As a consequence, it is no longer possible to opt-out of log shipping with `withoutLogShipping`; the IAM Policy will always grant PutRecord to the account's logging Kinesis stream.
14+
15+
To migrate, remove the `roleConfiguration` property and move any policies declared in `roleConfiguration.additionalPolicies` to the top level `additionalPolicies` property:
16+
17+
```ts
18+
// Before
19+
new GuEc2App(this, {
20+
// other props
21+
roleConfiguration: {
22+
additionalPolicies: [
23+
new GuAllowPolicy(this, "AllowPolicyCloudwatchLogs", {
24+
actions: ["cloudwatch:*", "logs:*"],
25+
resources: ["*"],
26+
}),
27+
new GuAllowPolicy(this, "AllowPolicyDescribeDecryptKms", {
28+
actions: ["kms:Decrypt", "kms:DescribeKey"],
29+
resources: [`arn:aws:kms:${region}:${account}:FrontendConfigKey`],
30+
}),
31+
],
32+
},
33+
});
34+
35+
// After
36+
new GuEc2App(this, {
37+
// other props
38+
additionalPolicies: [
39+
new GuAllowPolicy(this, "AllowPolicyCloudwatchLogs", {
40+
actions: ["cloudwatch:*", "logs:*"],
41+
resources: ["*"],
42+
}),
43+
new GuAllowPolicy(this, "AllowPolicyDescribeDecryptKms", {
44+
actions: ["kms:Decrypt", "kms:DescribeKey"],
45+
resources: [`arn:aws:kms:${region}:${account}:FrontendConfigKey`],
46+
}),
47+
],
48+
});
49+
```
50+
51+
A [GitHub search](https://github.com/search?q=org%3Aguardian+withoutLogShipping+NOT+repo%3Aguardian%2Fcdk++NOT+is%3Aarchived+NOT+repo%3Aguardian%2Faws-account-setup&type=code)
52+
shows the `withoutLogShipping` property is never set by clients when instantiating a `GuEc2App` or `GuLoadBalancedAppExperimental`.
53+
54+
### Minor Changes
55+
56+
- b97db0e: Apply `additionalPolicies` to ECS task role created for `GuLoadBalancedAppExperimental` so the ECS task role inherits any custom permissions needed to run the application.
57+
These are already applied to the EC2 instance role.
58+
359
## 63.6.2
460

561
### Patch Changes

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@guardian/cdk",
33
"description": "Generic Guardian flavoured AWS CDK components",
4-
"version": "63.6.2",
4+
"version": "64.0.0",
55
"main": "lib/index.js",
66
"types": "lib/index.d.ts",
77
"files": [

0 commit comments

Comments
 (0)