Skip to content

Commit

Permalink
fix: Fix ssl certificate recreation (#86)
Browse files Browse the repository at this point in the history
  • Loading branch information
flamarion committed Oct 5, 2023
1 parent e74a859 commit 8d0e800
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion modules/app_lb/https/main.tf
Original file line number Diff line number Diff line change
@@ -1,10 +1,22 @@
resource "random_pet" "cert" {
length = 2
keepers = {
fqdn = var.fqdn
}
}


# Create a managed SSL certificate that's issued and renewed by Google
resource "google_compute_managed_ssl_certificate" "default" {
name = "${var.namespace}-cert"
name = "${var.namespace}-cert-${random_pet.cert.id}"

managed {
domains = [var.fqdn]
}

lifecycle {
create_before_destroy = true
}
}

# Configure an HTTPS proxy with the Google-managed certificate and route it to
Expand Down

0 comments on commit 8d0e800

Please sign in to comment.