Skip to content

Commit 4820edf

Browse files
committed
chore: slickify terraform script
thanks @fatz!
1 parent fed54a5 commit 4820edf

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

scripts/terraform/up.sh

+3-8
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,11 @@ ssh-keygen -t rsa -N "" -f ~/.ssh/$TF_VAR_variant
66
ssh-add ~/.ssh/$TF_VAR_variant
77

88
echo "Running terraform init"
9-
for i in {1..3}; do terraform init && break; done
9+
for i in {1..3}; do terraform init --upgrade && break; done
1010

1111
echo "Running terraform apply. This may take a while. Expect 15 minutes."
1212
# we try to recover a couple times in case the first try did not work - which currently happens frequently.
13-
for i in {1..3}; do terraform apply -auto-approve > ./log && break; done
14-
15-
cat log
16-
17-
# something like `cluster-address = dcos-ui-system-tests-1371554912.us-west-2.elb.amazonaws.com`
18-
line=$(grep -o "cluster-address = \S*" ./log | head -n1)
13+
for i in {1..3}; do terraform apply -auto-approve && break; done
1914

2015
# print that cluster url
21-
echo http://$(echo $line | cut -d" " -f3)
16+
echo http://$(terraform output cluster-address)

0 commit comments

Comments
 (0)