diff --git a/terraform/application/application.tf b/terraform/application/application.tf index a9f8a84be1..681d651efe 100644 --- a/terraform/application/application.tf +++ b/terraform/application/application.tf @@ -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 } diff --git a/terraform/application/config/review.tfvars.json b/terraform/application/config/review.tfvars.json index c6941fb9e9..d070c1605f 100644 --- a/terraform/application/config/review.tfvars.json +++ b/terraform/application/config/review.tfvars.json @@ -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"] diff --git a/terraform/application/config/review_app_env.yml b/terraform/application/config/review_app_env.yml new file mode 100644 index 0000000000..a318e52330 --- /dev/null +++ b/terraform/application/config/review_app_env.yml @@ -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 diff --git a/terraform/application/variables.tf b/terraform/application/variables.tf index 2d7e11cfa9..f602f3b136 100644 --- a/terraform/application/variables.tf +++ b/terraform/application/variables.tf @@ -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) }