diff --git a/runner-manager/cf-driver/worker-setup/bundle/glrw-setup.d/git-lfs-setup.sh b/runner-manager/cf-driver/worker-setup/bundle/glrw-setup.d/git-lfs-setup.sh new file mode 100755 index 0000000..10c8180 --- /dev/null +++ b/runner-manager/cf-driver/worker-setup/bundle/glrw-setup.d/git-lfs-setup.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +git lfs install diff --git a/sandbox-deploy/terraform.sh b/sandbox-deploy/terraform.sh index cf49632..2093f94 100755 --- a/sandbox-deploy/terraform.sh +++ b/sandbox-deploy/terraform.sh @@ -7,11 +7,12 @@ $0: Run terraform commands against a given environment Usage: $0 -h - $0 [-f] [-c ] [-- ] + $0 [-f] [-c ] [-r] [-- ] Options: -h: show help and exit -f: Force, pass -auto-approve to all invocations of terraform +-r: Replace worker space, useful to reset after using PRESERVE_WORKER -c TERRAFORM-CMD: command to run. Defaults to $cmd []: arguments to pass as-is to terraform " @@ -19,9 +20,10 @@ Options: force="" args_to_shift=0 +declare -a optional_args set -e -while getopts ":hfc:" opt; do +while getopts ":hfrc:" opt; do case "$opt" in f) force="-auto-approve" @@ -31,6 +33,11 @@ while getopts ":hfc:" opt; do cmd=${OPTARG} args_to_shift=$((args_to_shift + 2)) ;; + r) + optional_args+=(-replace=module.sandbox-runner.module.worker_space.cloudfoundry_space.space) + optional_args+=(-replace="module.sandbox-runner.module.worker_space.cloudfoundry_security_group_space_bindings.security_group_bindings[\"trusted_local_networks_egress\"]") + args_to_shift=$((args_to_shift + 1)) + ;; h) echo "$usage" exit 0 @@ -48,6 +55,6 @@ cf org $dev_org &> /dev/null || cf login -a api.fr-stage.cloud.gov --sso -o $dev terraform init echo "==============================================================================================================" -echo "= Calling $cmd $force $@ on the sandbox infrastructure" +echo "= Calling $cmd $force " "${optional_args[@]}" " " "$@" " on the sandbox infrastructure" echo "==============================================================================================================" -terraform "$cmd" $force -compact-warnings "$@" +terraform "$cmd" $force -compact-warnings "${optional_args[@]}" "$@"