From d548da8b5262c228f0481c1808e93d123c15a971 Mon Sep 17 00:00:00 2001 From: sarna Date: Thu, 10 Aug 2023 14:48:55 -0600 Subject: [PATCH] Add example for adding crl file as part of config --- snippets/terraform/certificates/main.tf | 5 +++++ snippets/terraform/certificates/nginx.conf | 1 + snippets/terraform/certificates/rootca.crl | 18 ++++++++++++++++++ 3 files changed, 24 insertions(+) create mode 100644 snippets/terraform/certificates/rootca.crl diff --git a/snippets/terraform/certificates/main.tf b/snippets/terraform/certificates/main.tf index dad9640..e158a71 100644 --- a/snippets/terraform/certificates/main.tf +++ b/snippets/terraform/certificates/main.tf @@ -150,6 +150,11 @@ resource "azurerm_nginx_configuration" "example" { virtual_path = "/etc/nginx/site/api.conf" } + config_file { + content = filebase64("${path.module}/rootca.crl") + virtual_path = "/etc/nginx/ssl/rootca.crl" + } + depends_on = [ azurerm_nginx_certificate.example ] diff --git a/snippets/terraform/certificates/nginx.conf b/snippets/terraform/certificates/nginx.conf index 9aa9a04..da9d13d 100644 --- a/snippets/terraform/certificates/nginx.conf +++ b/snippets/terraform/certificates/nginx.conf @@ -3,6 +3,7 @@ http { listen 443 ssl; ssl_certificate /etc/nginx/ssl/test.crt; ssl_certificate_key /etc/nginx/ssl/test.key; + ssl_crl /etc/nginx/ssl/rootca.crl; location / { return 200 'Hello World'; } diff --git a/snippets/terraform/certificates/rootca.crl b/snippets/terraform/certificates/rootca.crl new file mode 100644 index 0000000..2a41267 --- /dev/null +++ b/snippets/terraform/certificates/rootca.crl @@ -0,0 +1,18 @@ +-----BEGIN X509 CRL----- +MIIC8DCB2QIBATANBgkqhkiG9w0BAQsFADBfMQswCQYDVQQGEwJVUzELMAkGA1UE +CAwCQ08xEDAOBgNVBAcMB0JvdWxkZXIxCzAJBgNVBAoMAkY1MQ4wDAYDVQQLDAVO +R0lOWDEUMBIGA1UEAwwLZXhhbXBsZS5jb20XDTIzMDgxMDIwMDc0MloXDTIzMDkw +OTIwMDc0MlowFDASAgEBFw0yMzA4MTAyM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