diff --git a/terraform/nowcasting/development/main.tf b/terraform/nowcasting/development/main.tf index eb5d7c68..b5b23514 100644 --- a/terraform/nowcasting/development/main.tf +++ b/terraform/nowcasting/development/main.tf @@ -17,10 +17,11 @@ This is the main terraform code for the UK platform. It is used to deploy the pl 5.1 - PVSite database 5.2 - PVSite API 5.3 - PVSite ML bucket -6.1 - Open Data PVnet -7.0 - API Open Quartz Solar +6.1 - Open Data PVnet (dev only) +7.0 - API Open Quartz Solar (dev only) 8.0 - Data Platform Database 8.1 - Data Platform API +9.0 - Primaries API Variables used across all modules ======*/ @@ -317,3 +318,32 @@ module "data_platform_api" { elbscheme="internal" elb_ports=["80","50051"] } + + +# 9.0 Primaries API +module "quartz-api" { + source = "../../modules/services/eb_app" + domain = local.domain + aws-region = var.region + aws-environment = local.environment + aws-subnet_id = module.networking.public_subnet_ids[0] + aws-vpc_id = module.networking.vpc_id + container-command = ["quartz-api"] + container-env_vars = [ + { "name" : "SOURCE", "value" : "dataplatform" }, + { "name" : "ROUTERS", "value" : "substations" }, + { "name" : "PORT", "value" : "80" }, + { "name" : "DB_URL", "value" : module.database.forecast-database-secret-url }, + { "name" : "AUTH0_DOMAIN", "value" : var.auth_domain }, + { "name" : "AUTH0_API_AUDIENCE", "value" : var.auth_api_audience }, + { "name" : "SENTRY_DSN", "value" : var.sentry_dsn_api }, + { "name" : "ENVIRONMENT", "value": local.environment}, + { "name" : "DATA_PLATFORM_HOST", "value": module.data_platform_api.api_url}, + { "name" : "DATA_PLATFORM_PORT", "value": "50051"}, + ] + container-name = "quartz-api" + container-tag = var.version-api + container-registry = "ghcr.io/openclimatefix" + eb-app_name = "quartz-api" + s3_bucket = [] +} \ No newline at end of file diff --git a/terraform/nowcasting/development/variables.tf b/terraform/nowcasting/development/variables.tf index 3ea51bd9..d2d87f4b 100644 --- a/terraform/nowcasting/development/variables.tf +++ b/terraform/nowcasting/development/variables.tf @@ -86,4 +86,10 @@ variable "data_platform_api_version" { type = string description = "Docker verions for the data platform api" default = "update-build-location" +} + +variable "version-api" { + type = string + description = "Docker image tag for the quartz api" + default = "0.3.4" } \ No newline at end of file