The SSL certificate is a separate resource that you can create through the GCP console, gcloud sdk, API or deployment manager template.
- If you already have the SSL certificate created - find the name of the SSL certificate using
gcloud compute ssl-certificates list
and get its URL with gcloud compute ssl-certificates describe CERT-NAME
. The URL will look like - https://www.googleapis.com/compute/v1/projects/PROJECT_ID/global/sslCertificates/SSL-CERT-NAME
Once you get the SSL URL, add the sslCertificates
key in your yaml or jinja file with the value of the URL to the certificate for your TargetHttpsProxy. Make sure the SSL certificate URL is a list or an array. as shown below in the body of TargetHttpsProxy resource - SSL certificate resource representation.
{
"id": string,
"creationTimestamp": string,
"name": string,
"description": string,
"selfLink": string,
"urlMap": string,
"sslCertificates": [
string
],
"quicOverride": enum,
"sslPolicy": string,
"kind": string
}
- SSL certificate doesn't exist - then create first and do step(1). You can find the SSL certificate resource representation in this link. Some other info on GCP SSL certificates is here.