Skip to content

Commit 88bc9e7

Browse files
add uk-national-quartz-api (#938)
* add uk-national-quartz-api * tidy up * update eb-app name * add comment * tidy up
1 parent a8e2d82 commit 88bc9e7

File tree

2 files changed

+38
-0
lines changed

2 files changed

+38
-0
lines changed

terraform/nowcasting/development/main.tf

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,38 @@ module "api" {
115115
max_ec2_count = 2
116116
}
117117

118+
# 1.2
119+
module "uk-national-quartz-api" {
120+
source = "../../modules/services/eb_app"
121+
domain = local.domain
122+
aws-region = var.region
123+
aws-environment = local.environment
124+
aws-subnet_id = module.networking.public_subnet_ids[0]
125+
aws-vpc_id = module.networking.vpc_id
126+
container-command = ["quartz-api"]
127+
container-env_vars = [
128+
{ "name" : "SOURCE", "value" : "dataplatform" },
129+
{ "name" : "ROUTERS", "value" : "uk_national" },
130+
{ "name" : "PORT", "value" : "80" },
131+
{ "name" : "SENTRY_DSN", "value" : var.sentry_dsn_api },
132+
{ "name" : "ENVIRONMENT", "value": local.environment},
133+
{ "name" : "DATA_PLATFORM_HOST", "value": module.data_platform_api.api_url},
134+
{ "name" : "DATA_PLATFORM_PORT", "value": "50051"},
135+
{ "name" : "AUTH0_DOMAIN", "value" : var.auth_domain },
136+
{ "name" : "AUTH0_AUDIENCE", "value" : var.auth_api_audience },
137+
{ "name" : "AUTH0_RULE_NAMESPACE", "value" : "https://openclimatefix.org"},
138+
# legacy, we shouldnt need this in the future,
139+
# but we need this for status in the mean time
140+
{ "name" : "DB_URL", "value" : module.database.forecast-database-secret-url },
141+
]
142+
container-name = "quartz-api"
143+
container-tag = var.uk-national-quartz-api
144+
container-registry = "ghcr.io/openclimatefix"
145+
eb-app_name = "uk-national-quartz-api"
146+
s3_bucket = []
147+
}
148+
149+
118150
# 2.1
119151
resource "aws_secretsmanager_secret" "nwp_consumer_secret" {
120152
name = "${local.environment}/data/nwp-consumer"

terraform/nowcasting/development/variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,4 +92,10 @@ variable "quartz-api" {
9292
type = string
9393
description = "Docker image tag for the quartz api"
9494
default = "0.3.4"
95+
}
96+
97+
variable "uk-national-quartz-api" {
98+
type = string
99+
description = "Docker image tag for the uk national quartz api"
100+
default = "0.3.4"
95101
}

0 commit comments

Comments
 (0)