terraform-google-modules/terraform-google-lb-http

Terraform Cloud - Error creating ManagedSslCertificate

cyril94440 opened this issue · 1 comments

TL;DR

It works locally, but on terraform cloud I get the following error :

Error: Error creating ManagedSslCertificate: Post "https://compute.googleapis.com/compute/beta/projects/149904888904/global/sslCertificates?alt=json": private key should be a PEM or plain PKCS1 or PKCS8; parse error: asn1: structure error: tags don't match (16 vs {class:0 tag:13 length:45 isCompound:true}) {optional:false explicit:false application:false private:false defaultValue:<nil> tag:<nil> stringType:0 timeType:0 set:false omitEmpty:false} pkcs1PrivateKey @2 with module.main-stack.module.oauth.module.lb-http.google_compute_managed_ssl_certificate.default[0] on .terraform/modules/main-stack.oauth.lb-http/modules/serverless_negs/main.tf line 148, in resource "google_compute_managed_ssl_certificate" "default": resource "google_compute_managed_ssl_certificate" "default" {

Expected behavior

No response

Observed behavior

No response

Terraform Configuration

module "lb-http" {
  source  = "terraform-google-modules/lb-http/google//modules/serverless_negs"
  version = "~> 10.1"

  project = data.google_project.current.number
  name    = "backend-load-balancer"

  address = var.loadbalancer_ip

  ssl                             = true
  managed_ssl_certificate_domains = [var.domain_url]
  https_redirect                  = true

  backends = {
    default = {
      description = null
      groups = [
        {
          group = google_compute_region_network_endpoint_group.serverless_neg.id
        }
      ]
      enable_cdn = false

      iap_config = {
        enable = false
      }
      log_config = {
        enable = false
      }
    }
  }
}

Terraform Version

1.6.1

Additional information

Terraform v1.6.1
on darwin_arm64

  • provider registry.terraform.io/hashicorp/google v5.18.0

Your version of Terraform is out of date! The latest version
is 1.7.4. You can update by downloading from https://www.terraform.io/downloads.html

(I've also tested with latest version on TFCloud)

My Service Account JSON wasn't properly formatted...