forked from taskcluster/taskcluster
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathweb-server-service.tf
44 lines (40 loc) · 1.61 KB
/
web-server-service.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
module "web_server_rabbitmq_user" {
source = "modules/rabbitmq-user"
prefix = "${var.prefix}"
project_name = "taskcluster-web-server"
rabbitmq_vhost = "${var.rabbitmq_vhost}"
}
resource "random_string" "web_server_access_token" {
length = 65
override_special = "_-"
}
module "web_server_secrets" {
source = "modules/service-secrets"
project_name = "taskcluster-web-server"
disabled_services = "${var.disabled_services}"
secrets = {
TASKCLUSTER_CLIENT_ID = "static/taskcluster/web-server"
TASKCLUSTER_ACCESS_TOKEN = "${random_string.web_server_access_token.result}"
NODE_ENV = "production"
MONITORING_ENABLE = "true"
MONITORING_PROJECT = "taskcluster-web-server"
PULSE_USERNAME = "${module.web_server_rabbitmq_user.username}"
PULSE_PASSWORD = "${module.web_server_rabbitmq_user.password}"
PULSE_HOSTNAME = "${var.rabbitmq_hostname}"
PULSE_VHOST = "${var.rabbitmq_vhost}"
LOGIN_STRATEGIES = ""
PUBLIC_URL = "${var.root_url}"
}
}
module "web_server_service" {
source = "modules/deployment"
project_name = "taskcluster-web-server"
service_name = "web-server"
proc_name = "web"
readiness_path = "/.well-known/apollo/server-health"
secret_name = "${module.web_server_secrets.secret_name}"
secrets_hash = "${module.web_server_secrets.secrets_hash}"
root_url = "${var.root_url}"
secret_keys = "${module.web_server_secrets.env_var_keys}"
docker_image = "${local.taskcluster_image_monoimage}"
}