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.
// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug
import { Construct } from "constructs";
import { Fn, Token, TerraformStack } from "cdktf";
/*
* Provider bindings are generated by running `cdktf get`.
* See https://cdk.tf/provider-generation for more details.
*/
import { CertRequest } from "./.gen/providers/tls/cert-request";
class MyConvertedCode extends TerraformStack {
constructor(scope: Construct, name: string) {
super(scope, name);
new CertRequest(this, "example", {
privateKeyPem: Token.asString(Fn.file("private_key.pem")),
subject: {
commonName: "example.com",
organization: "ACME Examples, Inc",
},
});
}
}
privateKeyPem
(String, Sensitive) Private key in PEM (RFC 1421) format, that the certificate will belong to. This can be read from a separate file using the file
interpolation function.dnsNames
(List of String) List of DNS names for which a certificate is being requested (i.e. certificate subjects).ipAddresses
(List of String) List of IP addresses for which a certificate is being requested (i.e. certificate subjects).subject
(Block List) The subject for which a certificate is being requested. The acceptable arguments are all optional and their naming is based upon Issuer Distinguished Names (RFC5280) section. (see below for nested schema)uris
(List of String) List of URIs for which a certificate is being requested (i.e. certificate subjects).certRequestPem
(String) The certificate request data in PEM (RFC 1421) format. NOTE: the underlying libraries that generate this value append a \n
at the end of the PEM. In case this disrupts your use case, we recommend using trimspace()
.id
(String) Unique identifier for this resource: hexadecimal representation of the SHA1 checksum of the resource.keyAlgorithm
(String) Name of the algorithm used when generating the private key provided in private_key_pem
.subject
Optional:
commonName
(String) Distinguished name: CN
country
(String) Distinguished name: C
locality
(String) Distinguished name: L
organization
(String) Distinguished name: O
organizationalUnit
(String) Distinguished name: OU
postalCode
(String) Distinguished name: PC
province
(String) Distinguished name: ST
serialNumber
(String) Distinguished name: SERIALNUMBER
streetAddress
(List of String) Distinguished name: STREET