add cf origin certs, swap LB to HTTPS

This commit is contained in:
41666 2020-12-11 00:16:58 -05:00
parent 961989197c
commit 18583f145a
6 changed files with 97 additions and 26 deletions

View file

@ -0,0 +1,20 @@
resource "tls_private_key" "tls_pk" {
algorithm = "RSA"
}
resource "tls_cert_request" "web_csr" {
key_algorithm = tls_private_key.tls_pk.algorithm
private_key_pem = tls_private_key.tls_pk.private_key_pem
subject {
common_name = "web-${var.environment_tag}.roleypoly.com"
organization = "Roleypoly"
}
}
resource "cloudflare_origin_ca_certificate" "web" {
csr = tls_cert_request.web_csr.cert_request_pem
hostnames = ["web-${var.environment_tag}.roleypoly.com"]
request_type = "origin-rsa"
requested_validity = 365 * 15
}