Skip to content

Instantly share code, notes, and snippets.

View kporras07's full-sized avatar

Kevin Porras kporras07

View GitHub Profile
@kporras07
kporras07 / lock-all-environments
Last active March 28, 2018 20:36 — forked from greg-1-anderson/lock-all-environments
Lock all of the environments for the given site, save for the live environment
#!/bin/bash
SITE=$1
USER=${2-demo}
BASE_PASSWORD=${3-secretsecret}
ALL_ENVS="$(terminus env:list $SITE --field=id | grep -v live)"
for ENV in $ALL_ENVS ; do
is_locked="$(terminus lock:info "$SITE.$ENV" --field=locked)"