Keypair secrets store asymmetric key pairs (public and private keys) with optional passphrase protection. Use them for SSH authentication, JWT signing, encryption, or any cryptographic operation requiring public-key infrastructure.
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 Keypair as the secret type.
4
Configure key data
Click Data in the left pane. For Secret Key, drag and drop your private key file or click to import. For Public Key, drag and drop your public key file or click to import. Enter the Passphrase if the private key is encrypted (optional).
This example uses a hardcoded passphrase for testing. In production, use Terraform variables or integrate with a secrets manager. Never commit private keys to version control.
TypeScript
Python
Go
C#
Copy
Ask AI
import * as cpln from "@pulumiverse/cpln";import * as fs from "fs";const keypairSecret = new cpln.Secret("my-keypair", { name: "my-keypair", description: "RSA keypair for JWT signing", keypair: { secretKey: fs.readFileSync("private_key.pem", "utf8"), publicKey: fs.readFileSync("public_key.pem", "utf8"), passphrase: "my-passphrase", // Optional },});
Copy
Ask AI
import pulumiverse_cpln as cplnwith open("private_key.pem") as f: secret_key = f.read()with open("public_key.pem") as f: public_key = f.read()keypair_secret = cpln.Secret("my-keypair", name="my-keypair", description="RSA keypair for JWT signing", keypair={ "secret_key": secret_key, "public_key": public_key, "passphrase": "my-passphrase", # Optional })