Skip to content
This repository was archived by the owner on Jun 12, 2018. It is now read-only.

Commit 837695a

Browse files
author
Nicolas Huray
committed
Resolve EC2 IP running a Consul Agent through API
1 parent 1720038 commit 837695a

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

  • consul/etc/services.d/consul-template

consul/etc/services.d/consul-template/run

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ if [ -z ${RUN_ON_AWS} ]; then
66
else
77
# Resolve the EC2 IP running a Consul Agent through API
88
# This a workaround for this issue : https://github.com/aws/amazon-ecs-agent/issues/185
9-
CONSUL_URL=$(curl http://169.254.169.254/latest/meta-data/local-hostname)
9+
HOST_IP=$(curl http://169.254.169.254/latest/meta-data/local-hostname)
10+
CONSUL_URL="$HOST_IP:8500"
1011
fi
1112

1213
if [ -d /etc/consul-template/conf ]; then

0 commit comments

Comments
 (0)