#!/bin/bash # # Please set the following environment variables: # $AWS_ACCESS_KEY_ID # $AWS_SECRET_ACCESS_KEY # $AWS_REGION # $AWS_AZ # $BOSH_PASSWORD # $AWS_KEYPAIR_KEY_NAME # $PRIVATE_KEY_PATH function getvars() { cd terraform/ EIP=$(terraform output eip) SUBNET=$(terraform output default_subnet_id) SECURITY_GROUP=$(terraform output security_group_id) cd ../ } getvars echo "Subnet = $SUBNET" echo "Security Group = $SECURITY_GROUP" echo "EIP = $EIP" echo "AWS REGION = $AWS_REGION" echo "AWS AZ = $AWS_AZ" cat >bosh-director.yml <