diff --git a/examples/installation/dsf_single_account_deployment/dam.tf b/examples/installation/dsf_single_account_deployment/dam.tf index 23c84e4fc..fe3924b7c 100644 --- a/examples/installation/dsf_single_account_deployment/dam.tf +++ b/examples/installation/dsf_single_account_deployment/dam.tf @@ -27,7 +27,7 @@ module "mx" { instance_profile_name = var.mx_instance_profile_name hub_details = var.enable_sonar ? { - address = coalesce(module.hub_main[0].public_dns, module.hub_main[0].private_dns) + address = module.hub_main[0].private_dns access_token = module.hub_main[0].access_tokens["dam-to-hub"].token port = 8443 } : null @@ -56,7 +56,7 @@ module "agent_gw" { instance_profile_name = var.agent_gw_instance_profile_name management_server_host_for_registration = module.mx[0].private_ip - management_server_host_for_api_access = coalesce(module.mx[0].public_ip, module.mx[0].private_ip) + management_server_host_for_api_access = module.mx[0].private_ip large_scale_mode = var.large_scale_mode.agent_gw gateway_group_name = local.gateway_group_name tags = local.tags @@ -74,7 +74,7 @@ module "agent_gw_cluster_setup" { cluster_name = var.cluster_name != null ? var.cluster_name : join("-", [local.deployment_name_salted, "agent", "gw", "cluster"]) gateway_group_name = local.gateway_group_name mx_details = { - address = coalesce(module.mx[0].public_ip, module.mx[0].private_ip) + address = module.mx[0].private_ip port = 8083 user = module.mx[0].web_console_user password = local.password diff --git a/examples/installation/dsf_single_account_deployment/dra.tf b/examples/installation/dsf_single_account_deployment/dra.tf index a6acf3ea1..c9cf00c68 100644 --- a/examples/installation/dsf_single_account_deployment/dra.tf +++ b/examples/installation/dsf_single_account_deployment/dra.tf @@ -45,7 +45,7 @@ module "dra_analytics" { instance_profile_name = var.dra_analytics_instance_profile_name archiver_password = local.password dra_admin_adress_for_registration = module.dra_admin[0].private_ip - dra_admin_adress_for_api_access = module.dra_admin[0].public_ip + dra_admin_adress_for_api_access = module.dra_admin[0].private_ip tags = local.tags send_usage_statistics = var.send_usage_statistics providers = { diff --git a/examples/installation/dsf_single_account_deployment/sonar.tf b/examples/installation/dsf_single_account_deployment/sonar.tf index dcda97b97..570692ad0 100644 --- a/examples/installation/dsf_single_account_deployment/sonar.tf +++ b/examples/installation/dsf_single_account_deployment/sonar.tf @@ -2,12 +2,10 @@ locals { tarball_location = var.tarball_location != null ? var.tarball_location : module.globals.tarball_location agentless_gw_count = var.enable_sonar ? var.agentless_gw_count : 0 - hub_main_public_ip = var.enable_sonar ? (module.hub_main[0].public_ip != null ? format("%s/32", module.hub_main[0].public_ip) : null) : null - hub_dr_public_ip = var.enable_sonar ? (module.hub_dr[0].public_ip != null ? format("%s/32", module.hub_dr[0].public_ip) : null) : null - hub_cidr_list = compact([data.aws_subnet.hub_main.cidr_block, data.aws_subnet.hub_dr.cidr_block, local.hub_main_public_ip, local.hub_dr_public_ip]) + hub_cidr_list = compact([data.aws_subnet.hub_main.cidr_block, data.aws_subnet.hub_dr.cidr_block]) agentless_gw_cidr_list = [data.aws_subnet.agentless_gw_main.cidr_block, data.aws_subnet.agentless_gw_dr.cidr_block] - hub_main_ip = var.enable_sonar ? (module.hub_main[0].public_dns != null ? module.hub_main[0].public_dns : module.hub_main[0].private_dns) : null - hub_dr_ip = var.enable_sonar ? (module.hub_dr[0].public_dns != null ? module.hub_dr[0].public_dns : module.hub_dr[0].private_dns) : null + hub_main_ip = var.enable_sonar ? module.hub_main[0].private_dns : null + hub_dr_ip = var.enable_sonar ? module.hub_dr[0].private_dns : null } module "hub_main" { @@ -46,7 +44,7 @@ module "hub_main" { base_directory = var.sonar_machine_base_directory mx_details = var.enable_dam ? [for mx in module.mx : { name = mx.display_name - address = coalesce(mx.public_dns, mx.private_dns) + address = mx.private_dns username = mx.web_console_user password = local.password }] : []