Skip to content

Commit

Permalink
Add domain mapping.
Browse files Browse the repository at this point in the history
  • Loading branch information
anybodys committed Feb 20, 2024
1 parent 5bc7291 commit 8d210cb
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions infra/app/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}

0 comments on commit 8d210cb

Please sign in to comment.