-
Notifications
You must be signed in to change notification settings - Fork 3
/
certificates.tf
45 lines (33 loc) · 1.09 KB
/
certificates.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# SSL certificates.
resource "google_compute_managed_ssl_certificate" "api" {
name = "serverpod-${var.runmode}-api-certificate"
managed {
domains = ["${var.subdomain_prefix}api.${var.top_domain}."]
}
}
resource "google_compute_managed_ssl_certificate" "insights" {
name = "serverpod-${var.runmode}-insights-certificate"
managed {
domains = ["${var.subdomain_prefix}insights.${var.top_domain}."]
}
}
resource "google_compute_managed_ssl_certificate" "web" {
name = "serverpod-${var.runmode}-web-certificate"
managed {
domains = ["${var.subdomain_prefix}${var.subdomain_web}.${var.top_domain}."]
}
}
resource "google_compute_managed_ssl_certificate" "web-top-domain" {
count = var.use_top_domain_for_web ? 1 : 0
name = "serverpod-${var.runmode}-web-top-domain-certificate"
managed {
domains = ["${var.top_domain}."]
}
}
resource "google_compute_managed_ssl_certificate" "storage" {
count = var.enable_storage ? 1 : 0
name = "serverpod-${var.runmode}-storage-certificate"
managed {
domains = ["${var.subdomain_prefix}storage.${var.top_domain}."]
}
}