tls_cert_request (Resource)

Creates a Certificate Signing Request (CSR) in PEM (RFC 1421) format.

PEM is the typical format used to request a certificate from a Certificate Authority (CA).

This resource is intended to be used in conjunction with a Terraform provider for a particular certificate authority in order to provision a new certificate.

This is a logical resource, so it contributes only to the current Terraform state and does not create any external managed resources.

Example Usage

resource "tls_cert_request" "example" {
  private_key_pem = file("private_key.pem")

  subject {
    common_name  = "example.com"
    organization = "ACME Examples, Inc"
  }
}

Schema

Required

Optional

Read-Only

Nested Schema for subject

Optional: