Skip to content

Commit

Permalink
Inherit from production env
Browse files Browse the repository at this point in the history
  • Loading branch information
AbigailMcP committed May 20, 2024
1 parent 45eb821 commit 7e42e73
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 50 deletions.
2 changes: 1 addition & 1 deletion config/environments/review.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# frozen_string_literal: true

require Rails.root.join("config/environments/test")
require Rails.root.join("config/environments/production")
10 changes: 4 additions & 6 deletions terraform/application/application.tf
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,10 @@ module "application_configuration" {

is_rails_application = true

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

This file was deleted.

5 changes: 0 additions & 5 deletions terraform/application/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,7 @@ 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 7e42e73

Please sign in to comment.