diff --git a/infra/app/main.tf b/infra/app/main.tf index cdc8e4e..d661ebf 100644 --- a/infra/app/main.tf +++ b/infra/app/main.tf @@ -25,3 +25,20 @@ locals { voting_image = "${local.image_base}voting_api:${local.voting_tag}" } +data "google_cloud_run_service" "client" { + location = var.region + name = "client" +} + +resource "google_cloud_run_domain_mapping" "client" { + location = var.region + name = "kmdcodes.com" + + metadata { + namespace = var.project + } + + spec { + route_name = data.google_cloud_run_service.client.name + } +}