Google Compute Engine Region SSL Certificate

This page shows how to write Terraform for Compute Engine Region SSL Certificate and write them securely.

code-icon

Fix issues in your cloud & app configurations

Test for misconfigurations of this resource in your cloud.

get-started-button

Terraform Example (google_compute_region_ssl_certificate)

A RegionSslCertificate resource, used for HTTPS load balancing. This resource provides a mechanism to upload an SSL key and certificate to the load balancer to serve secure connections from the user. To get more information about RegionSslCertificate, see:

Parameters

  • certificate required - string
    • The certificate in PEM format. The certificate chain must be no greater than 5 certs long. The chain must include at least one intermediate cert.

  • certificate_id requiredcomputed - number
    • The unique identifier for the resource.

  • creation_timestamp requiredcomputed - string
    • Creation timestamp in RFC3339 text format.

  • description optional - string
    • An optional description of this resource.

  • id optionalcomputed - string
  • name optionalcomputed - string
    • Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression 'a-z?' which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. These are in the same namespace as the managed SSL certificates.

  • name_prefix optionalcomputed - string
    • Creates a unique name beginning with the specified prefix. Conflicts with name.

  • private_key required - string
    • The write-only private key in PEM format.

  • project optionalcomputed - string
  • region optionalcomputed - string
    • The Region in which the created regional ssl certificate should reside. If it is not provided, the provider region is used.

  • self_link requiredcomputed - string

Example Usage (from GitHub)

github-iconniveklabs/google
resource "google_compute_region_ssl_certificate" "this" {
  certificate = var.certificate
  description = var.description
  name        = var.name
  name_prefix = var.name_prefix
  private_key = var.private_key
github-iconyaroslavopsguru/gcp-tf-resources
resource "google_compute_region_ssl_certificate" "default" {
  region      = "us-central1"
  name_prefix = "my-certificate-"
  description = "a description"
  private_key = file("../static/ssl_cert/test.key")
  certificate = file("../static/ssl_cert/test.crt")
github-iconclementous92/ops-terraform-modules-resources2
resource "google_compute_region_ssl_certificate" "cert" {
  count       = var.region != null ? 1 : 0
  region      = var.region
  name        = random_id.certificate.hex
  project     = var.project_id
  private_key = file(var.private_key_file_path)
github-iconreubanj/GCP-terraform
resource "google_compute_region_ssl_certificate" "default" {
  region      = "us-central1"
  name_prefix = "my-certificate-"
  description = "a description"
  private_key = file("../static/ssl_cert/test.key")
  certificate = file("../static/ssl_cert/test.crt")
github-iconterraform-google-modules/docs-examples
resource "google_compute_region_ssl_certificate" "default" {
  region      = "us-central1"
  name_prefix = "my-certificate-"
  description = "a description"
  private_key = file("../static/ssl_cert/test.key")
  certificate = file("../static/ssl_cert/test.crt")

Frequently asked questions

What is Google Compute Engine Region SSL Certificate?

Google Compute Engine Region SSL Certificate is a resource for Compute Engine of Google Cloud Platform. Settings can be wrote in Terraform.

Where can I find the example code for the Google Compute Engine Region SSL Certificate?

For Terraform, the niveklabs/google, yaroslavopsguru/gcp-tf-resources and clementous92/ops-terraform-modules-resources2 source code examples are useful. See the Terraform Example section for further details.