Skip to content

Commit 4cfeb69

Browse files
committed
fix: add dependency for cloud watch logs
1 parent 40f804a commit 4cfeb69

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ export class CdkWafGeoLib extends Construct {
155155

156156
if (props.enableCloudWatchLogs) {
157157
// Create logging configuration with log group as destination
158-
new CfnLoggingConfiguration(scope, 'webAclLoggingConfiguration', {
158+
const log_config = new CfnLoggingConfiguration(scope, 'webAclLoggingConfiguration', {
159159
logDestinationConfigs: [
160160
cdk.Stack.of(this).formatArn({
161161
arnFormat: cdk.ArnFormat.COLON_RESOURCE_NAME,
@@ -166,7 +166,7 @@ export class CdkWafGeoLib extends Construct {
166166
],
167167
resourceArn: cfnWebACL.attrArn,
168168
});
169-
169+
log_config.node.addDependency(log_group);
170170
new wafv2.CfnWebACLAssociation(this, 'WAFAssociation', {
171171
resourceArn: props.resourceArn,
172172
webAclArn: cfnWebACL.attrArn,

0 commit comments

Comments
 (0)