Skip to content

Commit

Permalink
add dns
Browse files Browse the repository at this point in the history
  • Loading branch information
jsbroks committed May 29, 2024
1 parent 1db110f commit 63f86a0
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion tests/public-dns/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,34 @@ locals {
description = "public-dns"
environment = "test"
}

subdomain = "tgw-pd"
}

data "google_client_config" "current" {}

data "google_dns_managed_zone" "default" {
project = data.google_client_config.current.project
name = "wandb-ml"
}

# Create A record which points to lb ip address
resource "google_dns_record_set" "a" {
project = data.google_client_config.current.project
name = "${local.subdomain}.${data.google_dns_managed_zone.default.dns_name}"
managed_zone = data.google_dns_managed_zone.default.name
type = "A"
ttl = 60
rrdatas = [module.wandb.address]
}

module "wandb" {
source = "../../"

namespace = random_pet.main.id
subdomain = random_pet.main.id
license = var.license
domain_name = "wandb.ml"
subdomain = local.subdomain

create_redis = true
use_internal_queue = true
Expand Down

0 comments on commit 63f86a0

Please sign in to comment.