feat: [PIDM-1151] create checkout front door cdn#3577
feat: [PIDM-1151] create checkout front door cdn#3577dylantangredi-jakala wants to merge 34 commits intomainfrom
Conversation
…agopa/pagopa-infra into PIDM-1151-migrate-checkout-cdn
| version = "<= 2.12.0" | ||
| version = "<= 2.12.1" | ||
| } | ||
| azapi = { |
There was a problem hiding this comment.
TODO: check if this azapi provider is still needed after the migration (not present in ecommerce-app).
Same for azuread and null_resource
There was a problem hiding this comment.
Edit: untouched for now
|
From an initial review, everything generally makes sense. However, looking at this PR, I have concerns about how we plan to handle the Prod rollout. What are the concrete steps to be executed in production?
|
|
@infantesimone I'll try to answer here:
|
…1151-migrate-checkout-cdn
An hint for the second point: keep it simple. I would leave the double SA during the migration phase (each cdn with it's own sa) as it will be temporary, just for the switch phase. Checkout-fe side we can modify the deploy pipeline to allow to deploy to both the new and the old cnd profiles (see here) allowing us to update the cdn and check that it's working before the switch (using endpoint hostname) |
|
Following the suggestions, we now have one branch with the v4 modules upgrade -> #3475 and one branch (the one from the current PR) where a new terraform file is defined, containing the code for the Front Door CDN creation and no custom domains. This will we applied in DEV and tested soon. A future PR will contain the code to make the actual switch and the file renaming/deletion. |
| { | ||
| action = "Overwrite" | ||
| name = local.cdn_frontdoor_csp_header_name | ||
| value = format("default-src 'self'; connect-src 'self' https://api.%s.%s https://api-eu.mixpanel.com https://wisp2.pagopa.gov.it https://privacyportalde-cdn.onetrust.com https://privacyportal-de.onetrust.com", var.dns_zone_prefix, var.external_domain) |
There was a problem hiding this comment.
Maybe https://wisp2.pagopa.gov.it and onetrust are no longer used, but to check with the team @pagopa/pagopa-team-touchpoint
There was a problem hiding this comment.
Removed wisp domain with 543020b after confirming with the team.
TODO check onetrust domains
EDIT: onetrust domains are needed for the correct scritpt loading on checkout terms page here https://github.com/pagopa/pagopa-checkout-fe/blob/1e0219051c645162e8a89eaf0690ce6320c81170/static/terms/it.html#L23
| { | ||
| action = "Append" | ||
| name = local.cdn_frontdoor_csp_header_name | ||
| value = "frame-ancestors 'none'; object-src 'none'; frame-src 'self' https://www.google.com *.platform.pagopa.it *.sia.eu *.nexigroup.com *.recaptcha.net recaptcha.net https://recaptcha.google.com;" |
There was a problem hiding this comment.
Removed with 543020b after confirming with the team
| { | ||
| action = "Append" | ||
| name = local.cdn_frontdoor_csp_header_name | ||
| value = "img-src 'self' https://acardste.vaservices.eu:* https://wisp2.pagopa.gov.it https://assets.cdn.io.italia.it www.gstatic.com/recaptcha data: https://assets.cdn.platform.pagopa.it https://privacyportalde-cdn.onetrust.com;" |
The base branch was changed.
|
🎉 All dependencies have been resolved ! |
depends on #3475
reference PR on ecommerce -> #3427
List of changes
NOTE: this does not create the record A or switch DNS as we can see from the attached plan, thanks to the
enable_dns_records = falsevariable setting in the custom_domains array.Effective switch will happen in a dedicated PR
Motivation and context
This change in needed to migrate the checkout CDN to Azure Front Door as Microsoft CDN Classic is being deprecated by Azure.
Technical analysis -> https://pagopa.atlassian.net/wiki/x/8wCHlg
Historical notes/tests -> https://pagopa.atlassian.net/wiki/x/ngDVmg
Type of changes
Does this introduce a change to production resources with possible user impact?
Impact Assessment:
Rollout plan:
Does this introduce an unwanted change on infrastructure? Check terraform plan execution result
Plan Summary: (attached below)
Plan: 14 to add, 0 to change, 0 to destroy.Other information
Note: the PR has not been applied yet in dev. Terraform plan has been executed and validated, but
terraform applyhas not been run.NOTE: this PR is not currently applicable in DEV since the CDN Classic has been removed from the DEV environment, see Test Migrazione Atomica DEV 2026 01 29
UAT plan:
Plan: 14 to add, 0 to change, 0 to destroy.Saved the plan to: uat_checkout_cdn.tfplanterraform show -no-color uat_checkout_cdn.tfplan > uat_checkout_cdn_plan_20260203.txtuat_checkout_cdn_plan_20260203.txtIf PR is partially applied, why? (reserved to mantainers)