Skip to content

Commit 7a6bf32

Browse files
committed
Add Feature Flag Infrastructure
1 parent e3c4272 commit 7a6bf32

File tree

5 files changed

+63
-18
lines changed

5 files changed

+63
-18
lines changed

THIRD_PARTY_LICENSE.txt

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ License: Apache-2.0
2121
Apache-2.0: @ampproject/[email protected]
2222
Apache-2.0: @aws-cdk/[email protected]
2323
Apache-2.0: @aws-cdk/[email protected]
24-
Apache-2.0: @aws-cdk/cloud-assembly-schema@48.3.0
24+
Apache-2.0: @aws-cdk/cloud-assembly-schema@48.9.0
2525
Apache-2.0: @aws-cdk/[email protected]
26-
Apache-2.0: @aws-cdk/integ-tests-alpha@2.210.0-alpha.0
26+
Apache-2.0: @aws-cdk/integ-tests-alpha@2.214.0-alpha.0
2727
Apache-2.0: @aws-crypto/[email protected]
2828
Apache-2.0: @aws-crypto/[email protected]
2929
Apache-2.0: @aws-crypto/[email protected]
@@ -131,7 +131,7 @@ Apache-2.0: @smithy/[email protected]
131131
Apache-2.0: @smithy/[email protected]
132132
Apache-2.0: @smithy/[email protected]
133133
Apache-2.0: @smithy/[email protected]
134-
Apache-2.0: aws-cdk-lib@2.210.0
134+
Apache-2.0: aws-cdk-lib@2.214.0
135135
Apache-2.0: [email protected]
136136
Apache-2.0: [email protected]
137137
Apache-2.0: [email protected]
@@ -394,7 +394,7 @@ MIT: [email protected]
394394
395395
396396
397-
397+
398398
399399
400400
@@ -508,6 +508,7 @@ MIT: [email protected]
508508
509509
510510
511+
511512
512513
513514
@@ -751,6 +752,7 @@ BSD-3-Clause: [email protected]
751752
BSD-3-Clause: [email protected]
752753
BSD-3-Clause: [email protected]
753754
BSD-3-Clause: [email protected]
755+
BSD-3-Clause: [email protected]
754756
BSD-3-Clause: [email protected]
755757
BSD-3-Clause: [email protected]
756758
BSD-3-Clause: [email protected]
@@ -826,5 +828,5 @@ License: (MIT OR CC0-1.0)
826828
*******************
827829
(MIT OR CC0-1.0): [email protected]
828830

829-
Total libraries: 763
831+
Total libraries: 765
830832

source/patterns/@aws-solutions-constructs/aws-sns-sqs/lib/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import * as kms from 'aws-cdk-lib/aws-kms';
1919
import * as defaults from '@aws-solutions-constructs/core';
2020
// Note: To ensure CDKv2 compatibility, keep the import statement for Construct separate
2121
import { Construct } from 'constructs';
22-
import { buildEncryptionKey } from "@aws-solutions-constructs/core";
22+
import { buildEncryptionKey ConstructsFeatureFlagsReport } from "@aws-solutions-constructs/core";
2323
import { FeatureFlags } from 'aws-cdk-lib/core';
2424
import { SNS_SUBSCRIPTIONS_SQS_DECRYPTION_POLICY } from 'aws-cdk-lib/cx-api';
2525

@@ -189,6 +189,7 @@ export class SnsToSqs extends Construct {
189189
*/
190190
constructor(scope: Construct, id: string, props: SnsToSqsProps) {
191191
super(scope, id);
192+
new ConstructsFeatureFlagsReport(this, `flag-report-${id}`);
192193
defaults.CheckSnsProps(props);
193194
defaults.CheckSqsProps(props);
194195
this.uniquePropChecks(props);
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
import { Construct } from 'constructs';
2+
import { attachCustomSynthesis, ISynthesisSession } from 'aws-cdk-lib';
3+
import { ArtifactType, FeatureFlag } from '@aws-cdk/cloud-assembly-schema';
4+
5+
const QUEUE_USE_SSE = "@aws-solutions-constructs/aws-sqs:QueueUseSse";
6+
7+
/**
8+
* A CDK L3 construct that creates resources for Solutions Feature Flags reporting
9+
*/
10+
export class ConstructsFeatureFlagsReport extends Construct {
11+
12+
static created = false;
13+
14+
constructor(scope: Construct, id: string) {
15+
super(scope, id);
16+
17+
if (!ConstructsFeatureFlagsReport.created) {
18+
ConstructsFeatureFlagsReport.created = true;
19+
attachCustomSynthesis(this, {
20+
onSynthesize: (session: ISynthesisSession) => {
21+
session.assembly.addArtifact("@aws-solutions-constructs/feature-flag-report", {
22+
type: ArtifactType.FEATURE_FLAG_REPORT,
23+
properties: {
24+
module: '@aws-solutions-constructs',
25+
flags: this.GetFlagDefinitions()
26+
}
27+
});
28+
},
29+
});
30+
}
31+
}
32+
33+
private GetFlagDefinitions(): Record<string, FeatureFlag> {
34+
return {
35+
[QUEUE_USE_SSE]: {
36+
recommendedValue: true,
37+
explanation: "Change the default behavior for the construct to encrypt the queue using Server Side Encryption (SSE)",
38+
userValue: this.node.tryGetContext(QUEUE_USE_SSE)
39+
}
40+
}
41+
}
42+
}

source/use_cases/aws-restaurant-management-demo/THIRD_PARTY_LICENSE.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ License: Apache-2.0
1313
*******************
1414
Apache-2.0: @aws-cdk/[email protected]
1515
Apache-2.0: @aws-cdk/[email protected]
16-
Apache-2.0: @aws-cdk/cloud-assembly-schema@48.3.0
17-
Apache-2.0: @aws-cdk/integ-tests-alpha@2.210.0-alpha.0
16+
Apache-2.0: @aws-cdk/cloud-assembly-schema@48.9.0
17+
Apache-2.0: @aws-cdk/integ-tests-alpha@2.214.0-alpha.0
1818
Apache-2.0: @balena/[email protected]
19-
Apache-2.0: aws-cdk-lib@2.210.0
19+
Apache-2.0: aws-cdk-lib@2.214.0
2020
Apache-2.0: [email protected]
2121
Apache-2.0: [email protected]
2222

@@ -42,15 +42,15 @@ MIT: [email protected]
4242
4343
4444
45-
45+
4646
4747
4848
4949
5050
5151
5252
53-
MIT: jsonfile@6.1.0
53+
MIT: jsonfile@6.2.0
5454
5555
5656
@@ -76,7 +76,7 @@ License: (MIT OR GPL-3.0-or-later)
7676
*******************
7777
License: BSD-3-Clause
7878
*******************
79-
BSD-3-Clause: fast-uri@3.0.6
79+
BSD-3-Clause: fast-uri@3.1.0
8080
BSD-3-Clause: [email protected]
8181
BSD-3-Clause: [email protected]
8282

source/use_cases/aws-s3-static-website/THIRD_PARTY_LICENSE.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ License: Apache-2.0
1313
*******************
1414
Apache-2.0: @aws-cdk/[email protected]
1515
Apache-2.0: @aws-cdk/[email protected]
16-
Apache-2.0: @aws-cdk/cloud-assembly-schema@48.3.0
17-
Apache-2.0: @aws-cdk/integ-tests-alpha@2.210.0-alpha.0
16+
Apache-2.0: @aws-cdk/cloud-assembly-schema@48.9.0
17+
Apache-2.0: @aws-cdk/integ-tests-alpha@2.214.0-alpha.0
1818
Apache-2.0: @balena/[email protected]
19-
Apache-2.0: aws-cdk-lib@2.210.0
19+
Apache-2.0: aws-cdk-lib@2.214.0
2020
Apache-2.0: [email protected]
2121

2222
*******************
@@ -41,15 +41,15 @@ MIT: [email protected]
4141
4242
4343
44-
44+
4545
4646
4747
4848
4949
5050
5151
52-
MIT: jsonfile@6.1.0
52+
MIT: jsonfile@6.2.0
5353
5454
5555
@@ -74,7 +74,7 @@ License: (MIT OR GPL-3.0-or-later)
7474
*******************
7575
License: BSD-3-Clause
7676
*******************
77-
BSD-3-Clause: fast-uri@3.0.6
77+
BSD-3-Clause: fast-uri@3.1.0
7878
BSD-3-Clause: [email protected]
7979
BSD-3-Clause: [email protected]
8080

0 commit comments

Comments
 (0)