Skip to content

Commit

Permalink
Use makefile service name variable in terraform
Browse files Browse the repository at this point in the history
  • Loading branch information
saliceti committed Jan 31, 2024
1 parent 42e5b26 commit 436ecfa
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ TERRAFILE_VERSION=0.8
ARM_TEMPLATE_TAG=1.1.10
RG_TAGS={"Product" : "Find a teaching school hub"}
REGION=UK South
SERVICE_NAME=teaching-school-hub-finder
SERVICE_NAME=cpd-tsh
SERVICE_SHORT=cpdtsh

help:
Expand Down
6 changes: 2 additions & 4 deletions terraform/application/application.tf
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
locals {
environment = "${var.environment}${var.app_suffix}"
service_name = "cpd-tsh"
domain = var.environment == "review" ? "cpd-tsh-${local.environment}-web.test.teacherservices.cloud" : var.domain
}

module "application_configuration" {
source = "./vendor/modules/aks//aks/application_configuration"

namespace = var.namespace
environment = local.environment
environment = local.environment
azure_resource_prefix = var.azure_resource_prefix
service_short = var.service_short
config_short = var.config_short
secret_key_vault_short = "app"

# Delete for non rails apps
is_rails_application = true

config_variables = {
Expand All @@ -37,7 +35,7 @@ module "web_application" {

namespace = var.namespace
environment = local.environment
service_name = local.service_name
service_name = var.service_name

cluster_configuration_map = module.cluster_data.configuration_map
kubernetes_config_map_name = module.application_configuration.kubernetes_config_map_name
Expand Down
4 changes: 2 additions & 2 deletions terraform/application/database.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module "postgres" {
namespace = var.namespace
environment = local.environment
azure_resource_prefix = var.azure_resource_prefix
service_name = local.service_name
service_name = var.service_name
service_short = var.service_short
config_short = var.config_short
cluster_configuration_map = module.cluster_data.configuration_map
Expand All @@ -25,7 +25,7 @@ module "redis-cache" {
azure_resource_prefix = var.azure_resource_prefix
service_short = var.service_short
config_short = var.config_short
service_name = local.service_name
service_name = var.service_name
cluster_configuration_map = module.cluster_data.configuration_map
use_azure = var.deploy_azure_backing_services
azure_enable_monitoring = var.enable_monitoring
Expand Down

0 comments on commit 436ecfa

Please sign in to comment.