From 4fb55b0c5e17b9635d786e77b5909c0aabcb63aa Mon Sep 17 00:00:00 2001 From: Scott Nowicki Date: Wed, 19 Apr 2017 19:19:15 -0500 Subject: [PATCH] made string generation more robust --- examples/azure-vm-simple-linux/deploy.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/examples/azure-vm-simple-linux/deploy.sh b/examples/azure-vm-simple-linux/deploy.sh index f9bdb63c1..c6f9bc55e 100755 --- a/examples/azure-vm-simple-linux/deploy.sh +++ b/examples/azure-vm-simple-linux/deploy.sh @@ -3,13 +3,15 @@ set -o errexit -o nounset # generate a unique string for CI deployment -KEY=$(cat /dev/urandom | tr -cd 'a-z' | head -c 16) +KEY=$(cat /dev/urandom | tr -cd 'a-z' | head -c 8) +KEY+=$(cat /dev/urandom | tr -cd '0-9' | head -c 8) +PASSWORD=KEY+"#" terraform get terraform plan \ -var 'dns_name='$KEY \ - -var 'admin_password='$KEY \ + -var 'admin_password='$PASSWORD \ -var 'admin_username='$KEY \ -var 'resource_group='$KEY \ -out=out.tfplan