mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-05 02:41:14 -05:00
Merge pull request #173 from GSA/cf-cli-8
Tweak tail & jq usage to parse cf-cli@8 output
This commit is contained in:
@@ -18,9 +18,16 @@ Options:
|
|||||||
-o <ORG NAME>: configure the organization to act on. Default: $org
|
-o <ORG NAME>: configure the organization to act on. Default: $org
|
||||||
|
|
||||||
Notes:
|
Notes:
|
||||||
OrgManager is required for terraform to create <env>-egress spaces
|
* OrgManager is required for terraform to create <env>-egress spaces
|
||||||
|
* Requires cf-cli@8
|
||||||
"
|
"
|
||||||
|
|
||||||
|
cf_version=`cf --version | cut -d " " -f 3`
|
||||||
|
if [[ $cf_version != 8.* ]]; then
|
||||||
|
echo "$usage"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
|
|
||||||
@@ -67,7 +74,7 @@ cf create-service cloud-gov-service-account $role $service 1>&2
|
|||||||
cf create-service-key $service service-account-key 1>&2
|
cf create-service-key $service service-account-key 1>&2
|
||||||
|
|
||||||
# output service key to stdout in secrets.auto.tfvars format
|
# output service key to stdout in secrets.auto.tfvars format
|
||||||
creds=`cf service-key $service service-account-key | tail -n 4`
|
creds=`cf service-key $service service-account-key | tail -n +2 | jq '.credentials'`
|
||||||
username=`echo $creds | jq -r '.username'`
|
username=`echo $creds | jq -r '.username'`
|
||||||
password=`echo $creds | jq -r '.password'`
|
password=`echo $creds | jq -r '.password'`
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user