azure is awfully particular for certain strings

This commit is contained in:
Scott Nowicki 2017-04-19 19:36:16 -05:00
parent e0208f48ba
commit af3de7b7df
2 changed files with 5 additions and 4 deletions

View File

@ -24,6 +24,7 @@ deploy:
repo: 10thmagnitude/terraform repo: 10thmagnitude/terraform
branch: topic-101-vm-simple-linux branch: topic-101-vm-simple-linux
# TODO: possibly use Azure CLI to delete the resource group
after_deploy: after_deploy:
- provider: script - provider: script
script: terraform destroy script: terraform destroy

View File

@ -3,10 +3,10 @@
set -o errexit -o nounset set -o errexit -o nounset
# generate a unique string for CI deployment # generate a unique string for CI deployment
KEY=$(cat /dev/urandom | tr -cd 'a-z' | head -c 8) KEY=$(cat /dev/urandom | tr -cd 'a-z' | head -c 12)
KEY+=$(cat /dev/urandom | tr -cd 'A-Z' | head -c 4) PASSWORD=KEY
KEY+=$(cat /dev/urandom | tr -cd '0-9' | head -c 4) PASSWORD+=$(cat /dev/urandom | tr -cd 'A-Z' | head -c 2)
PASSWORD=KEY+"#" PASSWORD+=$(cat /dev/urandom | tr -cd '0-9' | head -c 2)
terraform get terraform get