vmware-archive / terraforming-gcp

use terraform, deploy yourself a pcf
Apache License 2.0
71 stars 87 forks source link

Add Output support for the CloudSQL Server Certificate. #83

Closed JaysonBH closed 6 years ago

JaysonBH commented 6 years ago

Added Terraform Output support for the CloudSQL instance's Server CA certificate. Users will need this to create an encrypted connection with the Cloud SQL Instance.

This is the cert needed down the road in a PAS installation of CredHub that has a mandatory Server-CA field.

An example Encrypted connection can be obtained with the below script after:

#!/bin/sh

export HOST=`terraform output sql_db_ip`
export USER=`terraform output opsman_sql_username`
export PASS=`terraform output opsman_sql_password`

echo "PAS SQL Password: $PASS"

terraform output pas_sql_cert > server-ca.pem

echo "Encrypted Connection String:"

echo "mysql -u $USER -h $HOST -p \ "
echo     "--ssl-ca=server-ca.pem"

exit 0
cf-gitbot commented 6 years ago

We have created an issue in Pivotal Tracker to manage this. Unfortunately, the Pivotal Tracker project is private so you may be unable to view the contents of the story.

The labels on this github issue will be updated when the story is started.