Skip to content

Commit

Permalink
use production_type for active-active settings
Browse files Browse the repository at this point in the history
  • Loading branch information
Miguel Hernández committed May 31, 2024
1 parent 6e54fd5 commit cebcba2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ module "network" {
resource_group_name = module.resource_groups.resource_group_name
location = var.location

active_active = local.active_active
active_active = var.production_type == "active-active"
enable_ssh = var.enable_ssh
is_replicated_deployment = var.is_replicated_deployment

Expand All @@ -85,7 +85,7 @@ module "network" {
# -----------------------------------------------------------------------------
module "redis" {
source = "./modules/redis"
count = local.active_active == true ? 1 : 0
count = var.production_type == "active-active" ? 1 : 0

resource_group_name = module.resource_groups.resource_group_name
location = var.location
Expand Down Expand Up @@ -189,7 +189,7 @@ module "runtime_container_engine_config" {
disk_path = local.disk_mode ? var.disk_path : null
iact_subnets = join(",", var.iact_subnet_list)
iact_time_limit = var.iact_subnet_time_limit
operational_mode = local.active_active ? "active-active" : var.production_type
operational_mode = var.production_type
run_pipeline_image = var.run_pipeline_image
tfe_image = var.tfe_image
tfe_license = var.hc_license
Expand Down Expand Up @@ -342,7 +342,7 @@ module "load_balancer" {
zones = var.zones

# General
active_active = local.active_active
active_active = var.production_type == "active-active"
domain_name = var.domain_name
is_replicated_deployment = var.is_replicated_deployment
tfe_subdomain = var.tfe_subdomain
Expand Down
6 changes: 3 additions & 3 deletions outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -92,17 +92,17 @@ output "tfe_console_password" {
# Redis
# -----
output "redis_hostname" {
value = local.active_active == true ? module.redis[0].redis_cache.hostname : null
value = var.production_type == "active-active" ? module.redis[0].redis_cache.hostname : null
description = "The Hostname of the Redis Instance"
}

output "redis_ssl_port" {
value = local.active_active == true ? module.redis[0].redis_cache.ssl_port : null
value = var.production_type == "active-active" ? module.redis[0].redis_cache.ssl_port : null
description = "The SSL Port of the Redis Instance"
}

output "redis_pass" {
value = local.active_active == true ? module.redis[0].redis_cache.primary_access_key : null
value = var.production_type == "active-active" ? module.redis[0].redis_cache.primary_access_key : null
description = "The Primary Access Key for the Redis Instance"
}

Expand Down

0 comments on commit cebcba2

Please sign in to comment.