Skip to content

Commit

Permalink
App config for review environment
Browse files Browse the repository at this point in the history
  • Loading branch information
AbigailMcP committed May 13, 2024
1 parent d0ebb9d commit 2affc29
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 4 deletions.
10 changes: 6 additions & 4 deletions terraform/application/application.tf
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,12 @@ module "application_configuration" {

is_rails_application = true

config_variables = {
ENVIRONMENT_NAME = var.environment
PGSSLMODE = local.postgres_ssl_mode
}
config_variables = merge(
local.app_env_values,
{
ENVIRONMENT_NAME = var.environment
PGSSLMODE = local.postgres_ssl_mode
})
secret_variables = {
DATABASE_URL = module.postgres.url
}
Expand Down
1 change: 1 addition & 0 deletions terraform/application/config/review.tfvars.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"cluster": "test",
"namespace": "srtl-development",
"config": "review",
"deploy_azure_backing_services": false,
"enable_postgres_ssl": false,
"startup_command": ["/bin/sh", "-c", "bundle exec rake db:schema:load db:seed && bundle exec rails server -b 0.0.0.0"]
Expand Down
39 changes: 39 additions & 0 deletions terraform/application/config/review_app_env.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
DFE_SIGN_IN_API_CLIENT_ID: teacherpayments
DFE_SIGN_IN_API_SECRET: secret
DFE_SIGN_IN_API_ENDPOINT: https://example.com

DQT_API_URL: https://teacher-qualifications-api.education.gov.uk/
DQT_API_KEY: 1a2b3c4d5e6f7g8h9i0

DQT_BEARER_BASE_URL: https://login.microsoftonline.com/123456/oauth2/v2.0/token
DQT_BEARER_GRANT_TYPE: client_credentials
DQT_BEARER_SCOPE: https://test.dynamics.com/.default
DQT_BEARER_CLIENT_ID: 1234
DQT_BEARER_CLIENT_SECRET: 5678
DQT_BASE_URL: https://test-api-customerengagement.platform.education.gov.uk/dqt-crm/v1/
DQT_SUBSCRIPTION_KEY: 09876432

ADMIN_ALLOWED_IPS: ::1,127.0.0.1

ENVIRONMENT_NAME: test

RAILS_ENV: test

ORDNANCE_SURVEY_API_BASE_URL: https://api.os.uk
# ORDNANCE_SURVEY_CLIENT_PARAMS: { "key": "api-key-value" }

RUN_FLAKY_SPECS: true
RUN_JS_SPECS: true
RUN_SLOW_SPECS: true

SUPPRESS_DFE_ANALYTICS_INIT: true

HMRC_API_BASE_URL: https://test-api.service.hmrc.gov.uk
HMRC_API_BANK_VALIDATION_ENABLED: false
HMRC_API_CLIENT_ID: test
HMRC_API_CLIENT_SECRET: test

TID_SIGN_IN_ISSUER: https://preprod.teaching-identity.education.gov.uk/
TID_SIGN_IN_API_ENDPOINT: https://preprod.teaching-identity.education.gov.uk:433
TID_SIGN_IN_CLIENT_ID: claim
5 changes: 5 additions & 0 deletions terraform/application/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,12 @@ variable "enable_monitoring" {
default = false
description = "Enable monitoring and alerting"
}
variable "config" {
type = string
}

locals {
postgres_ssl_mode = var.enable_postgres_ssl ? "require" : "disable"
app_env_values_from_yml = yamldecode(file("${path.module}/config/${var.config}_app_env.yml"))
app_env_values = merge(local.app_env_values_from_yml)
}

0 comments on commit 2affc29

Please sign in to comment.