Skip to content

Commit 88309f1

Browse files
Merge pull request #3632 from nhsuk/shell_access_validation
Add validation step for produciton shell access
2 parents f0ba971 + e150df5 commit 88309f1

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

script/shell.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,14 @@ if [ -z "$env" ]; then
6565
usage
6666
exit 1
6767
fi
68+
if [ "$env" == "production" ]; then
69+
echo "You are trying to shell into a production container NOT Data-Replication. If you wish to proceed type 'production':"
70+
read -r confirm
71+
if [ "$confirm" != "production" ]; then
72+
echo "Validation failed. Exiting without shelling into production container."
73+
exit 1
74+
fi
75+
fi
6876

6977
cluster_name="mavis-$env"
7078

0 commit comments

Comments
 (0)