HOW-TO: Scripted Heroku SSL Certificate Management
Contents
Intent
Using Heroku SSL Automated Certificate Management (ACM), perform BASH scripts as the currently logged in user to:
- Display Heroku SSL Certificates for each App under the specified Team
- Manage (Create/Renew) SSL Certificates for the specified App
References
Scripts
Installing Heroku CLI under Ubuntu or Mac OS
brew tap heroku/brew && brew install heroku
Display Heroku SSL Certificates for each App under the specified Team
1 #!/usr/bin/bash
2 if [ -z "$1" ]
3 then
4 echo "USAGE: $0 <HEROKU-TEAM-NAME>"
5 echo "This script will display Heroku SSL Certificates for each App under the specified Team."
6 echo "The following teams are available for the currently logged in user:"
7 heroku teams
8 else
9 heroku apps -t $1 > heroku-apps.txt
10 tail -n +2 heroku-apps.txt | while read appname
11 do
12 heroku certs -a ${appname}
13 done
14 fi
Manage (Create/Renew) SSL Certificates for the specified App
# Under local development, will update Wiki once tested and verified