Skip to content

Commit e150df5

Browse files
Add validation step for produciton shell access
- Ensure that the user was not trying to access production-data-replication
1 parent fb8b695 commit e150df5

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)