made string generation more robust

This commit is contained in:
Scott Nowicki 2017-04-19 19:19:15 -05:00
parent acaea87c93
commit 4fb55b0c5e
1 changed files with 4 additions and 2 deletions

View File

@ -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