2017-04-20 00:59:56 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set -o errexit -o nounset
|
|
|
|
|
2017-04-20 22:45:05 +02:00
|
|
|
docker run --rm -it \
|
|
|
|
-e ARM_CLIENT_ID \
|
|
|
|
-e ARM_CLIENT_SECRET \
|
|
|
|
-e ARM_SUBSCRIPTION_ID \
|
|
|
|
-e ARM_TENANT_ID \
|
2017-04-21 02:46:42 +02:00
|
|
|
-v $(pwd):/data \
|
|
|
|
--entrypoint "/bin/sh" \
|
2017-04-20 20:52:15 +02:00
|
|
|
hashicorp/terraform:light \
|
2017-04-24 18:45:24 +02:00
|
|
|
-c "cd /data; \
|
|
|
|
/bin/terraform get; \
|
|
|
|
/bin/terraform validate; \
|
|
|
|
/bin/terraform plan -out=out.tfplan -var dns_name=$KEY -var hostname=$KEY -var resource_group=$KEY -var admin_password=$PASSWORD; \
|
|
|
|
/bin/terraform apply out.tfplan"
|