File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed
packer/linux/conf/docker/cron.hourly Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -14,8 +14,11 @@ mark_instance_unhealthy() {
14
14
# mark the instance for termination
15
15
echo " Marking instance as unhealthy"
16
16
17
+ # shellcheck disable=SC2155
17
18
local token=$( curl -X PUT -H " X-aws-ec2-metadata-token-ttl-seconds: 60" --fail --silent --show-error --location " http://169.254.169.254/latest/api/token" )
19
+ # shellcheck disable=SC2155
18
20
local instance_id=$( curl -H " X-aws-ec2-metadata-token: $token " --fail --silent --show-error --location " http://169.254.169.254/latest/meta-data/instance-id" )
21
+ # shellcheck disable=SC2155
19
22
local region=$( curl -H " X-aws-ec2-metadata-token: $token " --fail --silent --show-error --location " http://169.254.169.254/latest/meta-data/placement/region" )
20
23
21
24
aws autoscaling set-instance-health \
You can’t perform that action at this time.
0 commit comments