Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Website Cloudfront Distributions - Ignore Changes In staging Property #4401

Merged
merged 4 commits into from
Nov 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions packages/pulumi-aws/src/apps/website/createWebsitePulumiApp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,21 @@ export const createWebsitePulumiApp = (projectAppParams: CreateWebsitePulumiAppP
viewerCertificate: {
cloudfrontDefaultCertificate: true
}
},
opts: {
// We are ignoring changes to the "staging" property. This is because of the following.
// With the 5.41.0 release of Webiny, we also upgraded Pulumi to v6. This introduced a change
// with how Cloudfront distributions are deployed, where Pulumi now also controls the new
// `staging` property.
// If not set, Pulumi will default it to `false`. Which is fine, but, the problem is
// that, because this property did not exist before, it will always be considered as a change
// upon deployment.
// We might think this is fine, but, the problem is that a change in this property causes
// a full replacement of the Cloudfront distribution, which is not acceptable. Especially
// if a custom domain has already been associated with the distribution. This then would
// require the user to disassociate the domain, wait for the distribution to be replaced,
// and then re-associate the domain. This is not a good experience.
ignoreChanges: ["staging"]
}
});

Expand Down Expand Up @@ -221,6 +236,10 @@ export const createWebsitePulumiApp = (projectAppParams: CreateWebsitePulumiAppP
viewerCertificate: {
cloudfrontDefaultCertificate: true
}
},
opts: {
// Check the comment in the `appCloudfront` resource above for more info.
ignoreChanges: ["staging"]
}
});

Expand Down
Loading