diff --git a/main.tf b/main.tf index f743040..46f27e1 100644 --- a/main.tf +++ b/main.tf @@ -88,7 +88,7 @@ module "nomad_clients" { mode = "client" } - associate_public_ips = false + associate_public_ips = true namespace = module.resourcegroup.namespace vpc = module.networking.vpc security_group_id = module.networking.sg.nomad_client diff --git a/modules/cluster/templates/startup.sh b/modules/cluster/templates/startup.sh index a324b9b..e184a36 100644 --- a/modules/cluster/templates/startup.sh +++ b/modules/cluster/templates/startup.sh @@ -113,9 +113,9 @@ installDependencies PRIVATE_IP=$(lookupPathInMetadata ".network.interface[0].ipv4.ipAddress[0].privateIpAddress") # Consul Server also needs public IP -if [[ ${consul_mode} == "server" ]]; then - PUBLIC_IP=$(dig +short myip.opendns.com @resolver1.opendns.com) -fi +#if [[ ${consul_mode} == "server" ]]; then +PUBLIC_IP=$(dig +short myip.opendns.com @resolver1.opendns.com) +#fi if [[ ${consul_mode} != "disabled" ]]; then installConsul ${consul_version}