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

Reuse app domain for domain identity #834

Merged
merged 1 commit into from
Jan 15, 2025
Merged

Reuse app domain for domain identity #834

merged 1 commit into from
Jan 15, 2025

Conversation

lorenyu
Copy link
Contributor

@lorenyu lorenyu commented Jan 15, 2025

Ticket

N/A

Changes

  • Use service_config.domain_name for notifications-email-domain module
  • DRY up usage of domain_name and hosted_zone_id in service root module by defining local variables

Context for reviewers

We originally thought that the domain for the SES domain identity we create had to be the same as the root of the hosted zone domain rather than a subdomain, but we were wrong. This change causes the domain identity to just reuse the same domain as the app's configured domain, which simplifies things and also removes the chance of conflict between two apps that enable notifications.

Moreover, we originally thought that using the root of the hosted domain is fine as long as there's only one app in a hosted zone that enabled notifications. However, if multiple environments of an app shares a hosted zone (e.g. on some projects multiple environments share a non-prod hosted zone) then there will be conflicts. This change also fixes those conflicts.

Testing

see 🔒 https://github.com/navapbc/pfml-starter-kit-app/pull/245

@lorenyu lorenyu merged commit cb15833 into main Jan 15, 2025
9 checks passed
@lorenyu lorenyu deleted the lorenyu/notifications branch January 15, 2025 17:56
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.

2 participants