diff --git a/.changeset/moody-ears-sip.md b/.changeset/moody-ears-sip.md new file mode 100644 index 00000000..eb4abff2 --- /dev/null +++ b/.changeset/moody-ears-sip.md @@ -0,0 +1,5 @@ +--- +"@codedazur/cdk-site-distribution": patch +--- + +Cache invalidation is now triggered correctly. diff --git a/apps/infrastructure/package.json b/apps/infrastructure/package.json index 3c2e7296..86ec0373 100644 --- a/apps/infrastructure/package.json +++ b/apps/infrastructure/package.json @@ -9,7 +9,7 @@ "test": "jest --passWithNoTests", "synth": "cdk synth", "diff": "cdk diff", - "deploy": "cdk deploy --all --require-approval never", + "deploy": "cdk deploy --all --concurrency 2 --require-approval never", "destroy": "cdk destroy --all --force" }, "dependencies": { diff --git a/packages/cdk-site-distribution/src/constructs/SiteDistribution.ts b/packages/cdk-site-distribution/src/constructs/SiteDistribution.ts index 43a63f93..36a0f887 100644 --- a/packages/cdk-site-distribution/src/constructs/SiteDistribution.ts +++ b/packages/cdk-site-distribution/src/constructs/SiteDistribution.ts @@ -79,7 +79,7 @@ export class SiteDistribution extends Construct { this.distribution = this.createDistribution(); this.alias = this.createAlias(); - if (!(props.invalidateCache ?? true)) { + if (props.invalidateCache ?? true) { this.cacheInvalidator = this.createCacheInvalidator(); } }