mirror of
https://github.com/coder/coder.git
synced 2026-06-02 20:48:20 +00:00
5145cd002d
Closes https://github.com/coder/internal/issues/850 This PR has the scaletest infrastructure retrieve and use TLS certificates from the persistent observability cluster. To support creating multiple instances of the infrastructure simultaneously, `var.name` can be set to `alpha`, `bravo` or `charlie`, which retrieves the corresponding certificates. Also: - Adds support for wildcard apps. - Retrieves the Cloudflare token from GCP secrets.
22 lines
608 B
Terraform
22 lines
608 B
Terraform
data "cloudflare_zone" "domain" {
|
|
name = var.cloudflare_domain
|
|
}
|
|
|
|
resource "cloudflare_record" "coder" {
|
|
for_each = local.deployments
|
|
zone_id = data.cloudflare_zone.domain.zone_id
|
|
name = "${each.value.subdomain}.${var.cloudflare_domain}"
|
|
content = google_compute_address.coder[each.key].address
|
|
type = "A"
|
|
ttl = 3600
|
|
}
|
|
|
|
resource "cloudflare_record" "coder_wildcard" {
|
|
for_each = local.deployments
|
|
zone_id = data.cloudflare_zone.domain.id
|
|
name = each.value.wildcard_subdomain
|
|
content = cloudflare_record.coder[each.key].name
|
|
type = "CNAME"
|
|
ttl = 3600
|
|
}
|