Skip to content
This repository was archived by the owner on Aug 21, 2025. It is now read-only.

Commit 11cb8d9

Browse files
authored
Merge pull request #137 from GSA-TTS/git-lfs-install
Git lfs install
2 parents 3edb4bd + 34b0bb2 commit 11cb8d9

2 files changed

Lines changed: 14 additions & 4 deletions

File tree

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/sh
2+
3+
git lfs install

sandbox-deploy/terraform.sh

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,23 @@ $0: Run terraform commands against a given environment
77
88
Usage:
99
$0 -h
10-
$0 [-f] [-c <TERRAFORM-CMD>] [-- <EXTRA CMD ARGUMENTS>]
10+
$0 [-f] [-c <TERRAFORM-CMD>] [-r] [-- <EXTRA CMD ARGUMENTS>]
1111
1212
Options:
1313
-h: show help and exit
1414
-f: Force, pass -auto-approve to all invocations of terraform
15+
-r: Replace worker space, useful to reset after using PRESERVE_WORKER
1516
-c TERRAFORM-CMD: command to run. Defaults to $cmd
1617
[<EXTRA CMD ARGUMENTS>]: arguments to pass as-is to terraform
1718
"
1819

1920

2021
force=""
2122
args_to_shift=0
23+
declare -a optional_args
2224

2325
set -e
24-
while getopts ":hfc:" opt; do
26+
while getopts ":hfrc:" opt; do
2527
case "$opt" in
2628
f)
2729
force="-auto-approve"
@@ -31,6 +33,11 @@ while getopts ":hfc:" opt; do
3133
cmd=${OPTARG}
3234
args_to_shift=$((args_to_shift + 2))
3335
;;
36+
r)
37+
optional_args+=(-replace=module.sandbox-runner.module.worker_space.cloudfoundry_space.space)
38+
optional_args+=(-replace="module.sandbox-runner.module.worker_space.cloudfoundry_security_group_space_bindings.security_group_bindings[\"trusted_local_networks_egress\"]")
39+
args_to_shift=$((args_to_shift + 1))
40+
;;
3441
h)
3542
echo "$usage"
3643
exit 0
@@ -48,6 +55,6 @@ cf org $dev_org &> /dev/null || cf login -a api.fr-stage.cloud.gov --sso -o $dev
4855

4956
terraform init
5057
echo "=============================================================================================================="
51-
echo "= Calling $cmd $force $@ on the sandbox infrastructure"
58+
echo "= Calling $cmd $force " "${optional_args[@]}" " " "$@" " on the sandbox infrastructure"
5259
echo "=============================================================================================================="
53-
terraform "$cmd" $force -compact-warnings "$@"
60+
terraform "$cmd" $force -compact-warnings "${optional_args[@]}" "$@"

0 commit comments

Comments
 (0)