File tree Expand file tree Collapse file tree 4 files changed +26
-6
lines changed
scaletest/terraform/action Expand file tree Collapse file tree 4 files changed +26
-6
lines changed Original file line number Diff line number Diff line change 1
1
resource "cloudflare_record" "coder" {
2
2
for_each = local. deployments
3
3
zone_id = var. cloudflare_zone_id
4
- name = each. value . subdomain
4
+ name = " ${ each . value . subdomain } . ${ var . cloudflare_domain } "
5
5
content = google_compute_address. coder [each . key ]. address
6
6
type = " A"
7
7
ttl = 3600
@@ -11,7 +11,7 @@ resource "cloudflare_record" "coder_wildcard" {
11
11
for_each = local. deployments
12
12
zone_id = var. cloudflare_zone_id
13
13
name = each. value . wildcard_subdomain
14
- content = " ${ each . value . subdomain } . ${ var . cloudflare_domain } "
14
+ content = cloudflare_record . coder [ each . key ] . name
15
15
type = " CNAME"
16
16
ttl = 3600
17
17
}
Original file line number Diff line number Diff line change @@ -47,13 +47,14 @@ provider "google" {
47
47
}
48
48
49
49
data "google_container_cluster" "observability" {
50
- name = " observability "
51
- location = " us-east1-b "
50
+ name = var . observability_cluster_name
51
+ location = var . observability_cluster_location
52
52
project = var. project_id
53
53
}
54
54
55
+ # This is managed manually
55
56
data "google_secret_manager_secret_version" "cloudflare_api_token_dns" {
56
- secret = " cloudflare-api-token-dns "
57
+ secret = var . cloudflare_api_token_secret
57
58
project = var. project_id
58
59
}
59
60
Original file line number Diff line number Diff line change
1
+ locals {
2
+ coder_certs_namespace = " coder-certs"
3
+ }
4
+
1
5
# These certificates are managed by flux and cert-manager.
2
6
data "kubernetes_secret" "coder_tls" {
3
7
for_each = local. deployments
4
8
provider = kubernetes. observability
5
9
metadata {
6
10
name = " coder-${ var . name } -${ each . key } -tls"
7
- namespace = " coder-certs "
11
+ namespace = local . coder_certs_namespace
8
12
}
9
13
}
Original file line number Diff line number Diff line change @@ -79,6 +79,21 @@ variable "provisionerd_image_tag" {
79
79
default = " latest"
80
80
}
81
81
82
+ variable "observability_cluster_name" {
83
+ description = " Name of the observability GKE cluster."
84
+ default = " observability"
85
+ }
86
+
87
+ variable "observability_cluster_location" {
88
+ description = " Location of the observability GKE cluster."
89
+ default = " us-east1-b"
90
+ }
91
+
92
+ variable "cloudflare_api_token_secret" {
93
+ description = " Name of the Google Secret Manager secret containing the Cloudflare API token."
94
+ default = " cloudflare-api-token-dns"
95
+ }
96
+
82
97
// Prometheus
83
98
variable "prometheus_remote_write_url" {
84
99
description = " URL to push prometheus metrics to."
You can’t perform that action at this time.
0 commit comments