Infisical icon

Infisical

Manage secrets and related resources in Infisical

Actions40

Dynamic Secret → Create

AI-generated

Summary

Create a dynamic secret configuration in Infisical for a project and environment, using the supplied provider configuration and default lease TTL.

Inputs

  • Name (required) — Name for the dynamic secret.
  • Project Slug (required) — Slug of the Infisical project.
  • Environment Slug (required) — Slug of the target environment, such as dev or prod.
  • Provider (required) — JSON provider configuration with a provider type and provider-specific inputs; defaults to a postgres configuration with empty inputs.
  • Default TTL (required) — Default lease time-to-live, such as 1h or 30m; defaults to 1h.
  • Additional Fields — Optionally set Path, the folder path for the configuration (defaults to /), and Max TTL, the maximum lease time-to-live.

Output shape

A single dynamic secret record

Sends a POST request to Infisical’s dynamic-secrets endpoint and returns the response’s dynamicSecret property.

Examples

Example 1: Create a PostgreSQL dynamic secret in the dev environment, named app-db, with a one-hour default lease.

Set the project and environment slugs, provide the PostgreSQL provider inputs, and optionally choose a path or maximum TTL.

Links

Discussion