TLS secrets store SSL/TLS certificates and private keys for secure communication. Use them for custom domains, mTLS authentication, or any scenario requiring certificate-based security.
In the Console, navigate to Secrets and click New, or use the Create dropdown in the top-right corner and select Secret.
2
Enter basic information
Enter a Name and optional Description.
3
Select secret type
Select TLS as the secret type.
4
Configure certificate data
Click Data in the left pane. For TLS Key, drag and drop your private key file or click to import. For TLS Cert, drag and drop your certificate file or click to import. For TLS Chain (optional), drag and drop your certificate chain file or click to import.
5
Create the secret
Click Create.
Prepare your certificate files, then create the secret:
Never commit private keys to version control. Use Terraform state encryption and secure variable handling.
TypeScript
Python
Go
C#
Copy
Ask AI
import * as cpln from "@pulumiverse/cpln";import * as pulumi from "@pulumi/pulumi";import * as fs from "fs";const tlsSecret = new cpln.Secret("my-domain-tls", { name: "my-domain-tls", description: "TLS certificate for api.example.com", tls: { key: fs.readFileSync("private.key", "utf8"), cert: fs.readFileSync("certificate.crt", "utf8"), chain: fs.readFileSync("chain.crt", "utf8"), },});
Copy
Ask AI
import pulumiverse_cpln as cplnwith open("private.key") as f: private_key = f.read()with open("certificate.crt") as f: certificate = f.read()with open("chain.crt") as f: chain = f.read()tls_secret = cpln.Secret("my-domain-tls", name="my-domain-tls", description="TLS certificate for api.example.com", tls={ "key": private_key, "cert": certificate, "chain": chain, })