Deploy a single instance in Oracle Cloud
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

27 lines
434 B

#!/usr/bin/env bash
if [ -z "$1" ]; then
echo "Please specify GPG key as the first argument"
exit
fi
KEY_ID=$1
function encrypt {
gpg --encrypt --batch --yes -r $KEY_ID $1
if [ ! "$?" -eq "0" ]; then
exit
fi
}
encrypt "india.tfvars"
FILES=$(ls terraform.tfstate* | grep -v \.gpg)
for f in $FILES; do
encrypt $f
done
FILES=$(ls ssh/oracle* | grep -v \.gpg)
for f in $FILES; do
encrypt $f
done