From 6f899224bbbdc45301be15f42c3230e4768a1d8b Mon Sep 17 00:00:00 2001 From: Junaid Ahmed Date: Tue, 14 Apr 2026 23:22:45 +0100 Subject: [PATCH] feat: setup thehighlands --- terraform/apps/outputs.tf | 26 ++++++++++++++++++++ terraform/apps/thehighlands.tf | 45 ++++++++++++++++++++++++++++++++++ terraform/outputs.tf | 26 ++++++++++++++++++++ 3 files changed, 97 insertions(+) create mode 100644 terraform/apps/thehighlands.tf diff --git a/terraform/apps/outputs.tf b/terraform/apps/outputs.tf index 67ed039..7388bf1 100644 --- a/terraform/apps/outputs.tf +++ b/terraform/apps/outputs.tf @@ -181,3 +181,29 @@ output "pakistan_2003_required_dns" { description = "DNS records required at the registrar to verify and serve the custom domain" value = google_firebase_hosting_custom_domain.pakistan_2003.required_dns_updates } + +# ── thehighlands Outputs ──────────────────────────────────── +output "thehighlands_wif_provider" { + description = "WIF_PROVIDER for thehighlands repo GitHub secrets" + value = module.thehighlands_identity.wif_provider +} + +output "thehighlands_gcp_sa_email" { + description = "GCP_SA_EMAIL for thehighlands repo GitHub secrets" + value = module.thehighlands_identity.ci_cd_sa_email +} + +output "thehighlands_hosting_url" { + description = "Firebase Hosting URL" + value = module.thehighlands_hosting.site_url +} + +output "thehighlands_custom_domain" { + description = "Custom domain for thehighlands" + value = google_firebase_hosting_custom_domain.thehighlands.custom_domain +} + +output "thehighlands_required_dns" { + description = "DNS records required at the registrar to verify and serve the custom domain" + value = google_firebase_hosting_custom_domain.thehighlands.required_dns_updates +} diff --git a/terraform/apps/thehighlands.tf b/terraform/apps/thehighlands.tf new file mode 100644 index 0000000..adc23ad --- /dev/null +++ b/terraform/apps/thehighlands.tf @@ -0,0 +1,45 @@ +# ───────────────────────────────────────────────────────────── +# thehighlands — Static property development site (pre-rendered HTML) +# ───────────────────────────────────────────────────────────── +# Migrated from legacy PHP hosting. Pre-rendered from PHP templates +# and served entirely from Firebase Hosting — no Cloud Run, no DB. +# Contact form posts to Formspree; no server-side handling. +# ───────────────────────────────────────────────────────────── + +module "thehighlands_identity" { + source = "../modules/app-identity" + + project_id = var.project_id + app_name = "thehighlands" + github_org = var.github_org + github_repo = "thehighlands" + wif_pool_id = var.wif_pool_id + wif_pool_name = var.wif_pool_name + + ci_cd_roles = [ + "roles/firebasehosting.admin", + "roles/firebase.admin", + "roles/iam.serviceAccountUser", + "roles/serviceusage.serviceUsageConsumer", + ] + + runtime_roles = [ + "roles/logging.logWriter", + ] +} + +module "thehighlands_hosting" { + source = "../modules/hosting" + + project_id = var.project_id + site_id = "thehighlands" +} + +resource "google_firebase_hosting_custom_domain" "thehighlands" { + provider = google-beta + project = var.project_id + site_id = module.thehighlands_hosting.site_id + custom_domain = "thehighlands.junaid.guru" + + wait_dns_verification = false +} \ No newline at end of file diff --git a/terraform/outputs.tf b/terraform/outputs.tf index 0af8190..105eadc 100644 --- a/terraform/outputs.tf +++ b/terraform/outputs.tf @@ -193,3 +193,29 @@ output "pakistan_2003_required_dns" { description = "DNS records required at the registrar to verify and serve the pakistan-2003 custom domain" value = module.apps.pakistan_2003_required_dns } + +# ── thehighlands ──────────────────────────────────────────── +output "thehighlands_wif_provider" { + description = "WIF_PROVIDER for thehighlands repo GitHub secrets" + value = module.apps.thehighlands_wif_provider +} + +output "thehighlands_gcp_sa_email" { + description = "GCP_SA_EMAIL for thehighlands repo GitHub secrets" + value = module.apps.thehighlands_gcp_sa_email +} + +output "thehighlands_hosting_url" { + description = "thehighlands Firebase Hosting URL" + value = module.apps.thehighlands_hosting_url +} + +output "thehighlands_custom_domain" { + description = "thehighlands custom domain" + value = module.apps.thehighlands_custom_domain +} + +output "thehighlands_required_dns" { + description = "DNS records required at the registrar to verify and serve the thehighlands custom domain" + value = module.apps.thehighlands_required_dns +}