Skip to content

Commit fda1a20

Browse files
vgkowskivgkowski
andauthored
fix governance retention policy and e2e tests (#911)
Co-authored-by: vgkowski <[email protected]>
1 parent f00326e commit fda1a20

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

framework/src/governance/lib/custom-authorizer-environment-helpers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ export function authorizerEnvironmentWorkflowSetup(
125125

126126
const stateMachineLogGroup = new LogGroup(scope, 'StateMachineLogGroup', {
127127
logGroupName: `/aws/vendedlogs/states/${authorizerName}/environment`,
128-
removalPolicy,
128+
removalPolicy: removalPolicy || RemovalPolicy.RETAIN,
129129
retention: logRetention || DEFAULT_LOGS_RETENTION,
130130
});
131131

framework/test/e2e/datazone-msk.e2e.test.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ jest.setTimeout(10000000);
1414

1515
// GIVEN
1616
const app = new cdk.App();
17-
const testStack = new TestStack('E2eTestStack', app);
17+
const testStack = new TestStack('DataZoneMskTestStack', app);
1818
const { stack } = testStack;
1919

2020
stack.node.setContext('@data-solutions-framework-on-aws/removeDataOnDestroy', true);
2121

2222
const cfnDomain = new CfnDomain(stack, 'CfnDomain', {
23-
domainExecutionRole: 'arn:aws:iam::145388625860:role/service-role/AmazonDataZoneDomainExecution',
23+
domainExecutionRole: `arn:aws:iam::${stack.account}:role/service-role/AmazonDataZoneDomainExecution`,
2424
name: 'dsfE2eTest',
2525
});
2626

@@ -35,6 +35,7 @@ new DataZoneMskCentralAuthorizer(testStack.stack, 'MskAuthorizer', {
3535

3636
new DataZoneMskEnvironmentAuthorizer(stack, 'MskEnvAuthorizer', {
3737
domainId: cfnDomain.attrId,
38+
removalPolicy: cdk.RemovalPolicy.DESTROY,
3839
});
3940

4041
// mskCentralAuthorizer.registerAccount('123456789012', '123456789012');
@@ -51,6 +52,7 @@ new DataZoneGsrMskDataSource(stack, 'GsrMskDataSource', {
5152
clusterName: 'testCluster',
5253
runSchedule: Schedule.cron({ minute: '0', hour: '12' }),
5354
enableSchemaRegistryEvent: true,
55+
removalPolicy: cdk.RemovalPolicy.DESTROY,
5456
});
5557

5658
// createSubscriptionTarget(stack, 'Consumer',

0 commit comments

Comments
 (0)