0

I am trying to create a Https load balancer using yaml and Jinja files on GCP deployment manager. But I am not sure how to provide SSL certificate. In the "sslCertificates" of "compute.v1.targetHttpsProxy", it expects the value to be URL to sslCertificates. How do i create an URL for the SSL certificate. Earlier, I was trying to provide the certificate itself in the field but I get an error saying "The URL is malformed".

Please help if anyone knows how to solve this.

2

The SSL certificate is a separate resource that you can create through the GCP console, gcloud sdk, API or deployment manager template.

  1. 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 }

  1. 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.
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.