Skip to content

Commit 4502b8b

Browse files
committed
define cognito auth outside of control plane to disable scopes for testing
1 parent b1ad970 commit 4502b8b

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/control-plane/integ.default.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import * as cdk from 'aws-cdk-lib';
55
import { CfnRule, EventBus, Rule } from 'aws-cdk-lib/aws-events';
66
import { LogGroup, RetentionDays } from 'aws-cdk-lib/aws-logs';
77
import { AwsSolutionsChecks } from 'cdk-nag';
8-
import { ControlPlane } from '.';
8+
import { CognitoAuth, ControlPlane } from '.';
99
import { DestroyPolicySetter } from '../cdk-aspect/destroy-policy-setter';
1010

1111
export interface IntegStackProps extends cdk.StackProps {
@@ -16,7 +16,12 @@ export class IntegStack extends cdk.Stack {
1616
constructor(scope: cdk.App, id: string, props: IntegStackProps) {
1717
super(scope, id, props);
1818

19+
const cognitoAuth = new CognitoAuth(this, 'CognitoAuth', {
20+
setAPIGWScopes: false, // only for testing purposes!
21+
});
22+
1923
const controlPlane = new ControlPlane(this, 'ControlPlane', {
24+
auth: cognitoAuth,
2025
systemAdminEmail: props.systemAdminEmail,
2126
});
2227

0 commit comments

Comments
 (0)