Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
eytannnaim committed Oct 25, 2023
1 parent 3e20a26 commit d11dfb7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
6 changes: 3 additions & 3 deletions examples/installation/dsf_single_account_deployment/dam.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion examples/installation/dsf_single_account_deployment/dra.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down
10 changes: 4 additions & 6 deletions examples/installation/dsf_single_account_deployment/sonar.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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" {
Expand Down Expand Up @@ -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
}] : []
Expand Down

0 comments on commit d11dfb7

Please sign in to comment.