Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion apps/frontend/src/components/MockLocationNotice.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export default function MockLocationNotice() {
</a>{' '}
or the
<a
href={'https://gspotter.graesberg.com'}
href={'https://gspotter.rsmafia.org'}
target="_blank"
rel="norefferer"
>
Expand Down
6 changes: 3 additions & 3 deletions infra/cloud/bootstrap/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ resource "azurerm_storage_container" "bootstrap" {
}

resource "azurerm_role_assignment" "blob_data_owner" {
scope = azurerm_storage_account.bootstrap.id
role_definition_name = "Storage Blob Data Owner"
principal_id = "0e18a31c-3e2e-4901-87f8-9cdfdd922242"
scope = azurerm_storage_account.bootstrap.id
role_definition_name = "Storage Blob Data Owner"
principal_id = "0e18a31c-3e2e-4901-87f8-9cdfdd922242"
}
4 changes: 2 additions & 2 deletions infra/cloud/prod/containers.tf
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,8 @@ resource "azurerm_container_app" "backend_container" {

# ------------------------------------------------------------------
# Frontend - TanStack Start / Nitro on port 3000.
# The only publicly exposed app; served at gspotter.graesberg.com through
# Cloudflare. Nitro proxies /graphql to the internal backend and SSR
# The only publicly exposed app; served at the domain configured in vars.tf
# through Cloudflare. Nitro proxies /graphql to the internal backend and SSR
# loaders fetch BACKEND_URL directly.
# ------------------------------------------------------------------

Expand Down
17 changes: 14 additions & 3 deletions infra/cloud/prod/dns.tf
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,10 @@ resource "tls_cert_request" "origin" {
}

resource "cloudflare_origin_ca_certificate" "origin" {
csr = tls_cert_request.origin.cert_request_pem
hostnames = [local.app_fqdn, var.domain, "*.${var.domain}"]
csr = tls_cert_request.origin.cert_request_pem
// Cloudflare returns hostnames sorted, so keep the config ordered to avoid
// a perpetual destroy/create diff.
hostnames = sort([local.app_fqdn, var.domain, "*.${var.domain}"])
request_type = "origin-rsa"
requested_validity = 5475 // 15 years
}
Expand Down Expand Up @@ -90,8 +92,17 @@ resource "azurerm_container_app_environment_certificate" "origin" {
}

// Let the asuid TXT record propagate before Azure validates domain ownership.
// The triggers make the wait re-run whenever the domain or zone changes (e.g.
// migrating zones); otherwise an existing sleep is reused and Azure can
// validate before the new records have propagated.
resource "time_sleep" "dns_propagation" {
depends_on = [cloudflare_dns_record.app_asuid]
depends_on = [cloudflare_dns_record.app_asuid]

triggers = {
zone_id = var.cloudflare_zone_id
app_fqdn = local.app_fqdn
}

create_duration = "60s"
}

Expand Down
2 changes: 1 addition & 1 deletion infra/cloud/prod/vars.tf
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ variable "neon_api_key" {

variable "domain" {
type = string
default = "graesberg.com"
default = "rsmafia.org"
}

variable "app_subdomain" {
Expand Down