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

Cloudfront Distributions - Ignore Changes In staging Property (5.40.x Port) #4413

Merged
merged 2 commits into from
Nov 26, 2024

Conversation

adrians5j
Copy link
Member

@adrians5j adrians5j commented Nov 26, 2024

Changes

Note

This PR is an attempt to port #4401 into 5.40.x version of Webiny.

Note that, while doing that, we've detected an issue with the original PR, where we only addressed the staging property-related issue for CloudFront distributions deployed as part of the Website project apps. The same needs to be done with other distributions that are deployed with API and Admin apps.

This is fully handled in this PR. So, for 5.40.x, once this is merged, there won't be any additional changes to be made. But, for 5.41.x, we'll be creating an additional PR that addresses the detected issue, which should be merged and released with 5.41.3.

With this PR, we are ignoring changes to the "staging" property when deploying Website app's Cloudfront distributions. I've added the following comment in the code:

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.

How Has This Been Tested?

Manually. After adding staging to the ignoreChanges array, I was able to do any change to the property, and no replacements would be done by Pulumi.

Documentation

Changelog.

@adrians5j adrians5j changed the title Cloudfront Distributions - Ignore Changes In staging Property Cloudfront Distributions - Ignore Changes In staging Property (5.40.x Port) Nov 26, 2024
@adrians5j adrians5j merged commit 7236a5d into 5.40.7 Nov 26, 2024
92 checks passed
@adrians5j adrians5j deleted the 5.40.7-staging-port branch January 7, 2025 07:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant