mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-09-22 13:39:35 +00:00
294 lines
7.3 KiB
Plaintext
294 lines
7.3 KiB
Plaintext
---
|
|
title: "infisical dynamic-secrets"
|
|
description: "Perform various operations with Infisical dynamic secrets"
|
|
---
|
|
|
|
```
|
|
infisical dynamic-secrets
|
|
```
|
|
|
|
## Description
|
|
|
|
This command enables you to perform list, lease, renew lease, and revoke lease operations on dynamic secrets within your Infisical project.
|
|
|
|
### Sub-commands
|
|
|
|
<Accordion title="infisical dynamic-secrets">
|
|
Use this command to print out all of the dynamic secrets in your project.
|
|
|
|
```bash
|
|
$ infisical dynamic-secrets
|
|
```
|
|
|
|
### Environment variables
|
|
|
|
<Accordion title="INFISICAL_TOKEN">
|
|
Used to fetch dynamic secrets via a [machine identity](/documentation/platform/identities/machine-identities) instead of logged-in credentials. Simply, export this variable in the terminal before running this command.
|
|
|
|
```bash
|
|
# Example
|
|
export INFISICAL_TOKEN=$(infisical login --method=universal-auth --client-id=<identity-client-id> --client-secret=<identity-client-secret> --silent --plain) # --plain flag will output only the token, so it can be fed to an environment variable. --silent will disable any update messages.
|
|
```
|
|
|
|
</Accordion>
|
|
|
|
<Accordion title="INFISICAL_DISABLE_UPDATE_CHECK">
|
|
Used to disable the check for new CLI versions. This can improve the time it takes to run this command. Recommended for production environments.
|
|
|
|
To use, simply export this variable in the terminal before running this command.
|
|
|
|
```bash
|
|
# Example
|
|
export INFISICAL_DISABLE_UPDATE_CHECK=true
|
|
```
|
|
|
|
</Accordion>
|
|
|
|
### Flags
|
|
|
|
<Accordion title="--projectId">
|
|
The project ID to fetch dynamic secrets from. This is required when using a machine identity to authenticate.
|
|
|
|
```bash
|
|
# Example
|
|
infisical dynamic-secrets --projectId=<project-id>
|
|
```
|
|
|
|
</Accordion>
|
|
|
|
<Accordion title="--token">
|
|
The authenticated token to fetch dynamic secrets from. This is required when using a machine identity to authenticate.
|
|
|
|
```bash
|
|
# Example
|
|
infisical dynamic-secrets --token=<token>
|
|
```
|
|
|
|
</Accordion>
|
|
|
|
<Accordion title="--env">
|
|
Used to select the environment name on which actions should be taken. Default
|
|
value: `dev`
|
|
</Accordion>
|
|
|
|
<Accordion title="--path">
|
|
Use to select the project folder on which dynamic secrets will be accessed.
|
|
|
|
```bash
|
|
# Example
|
|
infisical dynamic-secrets --path="/" --env=dev
|
|
```
|
|
|
|
</Accordion>
|
|
</Accordion>
|
|
<Accordion title="infisical dynamic-secrets lease create">
|
|
This command is used to create a new lease for a dynamic secret.
|
|
|
|
```bash
|
|
$ infisical dynamic-secrets lease create <dynamic-secret-name>
|
|
```
|
|
|
|
### Flags
|
|
|
|
<Accordion title="--env">
|
|
Used to select the environment name on which actions should be taken. Default
|
|
value: `dev`
|
|
</Accordion>
|
|
|
|
<Accordion title="--plain">
|
|
The `--plain` flag will output dynamic secret lease credentials values without formatting, one per line.
|
|
Default value: `false`
|
|
|
|
```bash
|
|
# Example
|
|
infisical dynamic-secrets lease create dynamic-secret-postgres --plain
|
|
```
|
|
|
|
</Accordion>
|
|
|
|
<Accordion title="--path">
|
|
The `--path` flag indicates which project folder dynamic secrets will be injected from.
|
|
|
|
```bash
|
|
# Example
|
|
infisical dynamic-secrets lease create <dynamic-secret-name> --path="/" --env=dev
|
|
```
|
|
|
|
</Accordion>
|
|
|
|
<Accordion title="--projectId">
|
|
The project ID of the dynamic secrets to lease from. This is required when using a machine identity to authenticate.
|
|
|
|
```bash
|
|
# Example
|
|
infisical dynamic-secrets lease create <dynamic-secret-name> --projectId=<project-id>
|
|
```
|
|
|
|
</Accordion>
|
|
|
|
<Accordion title="--token">
|
|
The authenticated token to create dynamic secret leases. This is required when using a machine identity to authenticate.
|
|
|
|
```bash
|
|
# Example
|
|
infisical dynamic-secrets lease create <dynamic-secret-name> --token=<token>
|
|
```
|
|
|
|
</Accordion>
|
|
|
|
<Accordion title="--ttl">
|
|
The lease lifetime. If not provided, the default TTL of the dynamic secret root credential will be used.
|
|
|
|
```bash
|
|
# Example
|
|
infisical dynamic-secrets lease create <dynamic-secret-name> --ttl=<ttl>
|
|
```
|
|
|
|
</Accordion>
|
|
|
|
</Accordion>
|
|
<Accordion title="infisical dynamic-secrets lease list">
|
|
This command is used to list leases for a dynamic secret.
|
|
|
|
```bash
|
|
$ infisical dynamic-secrets lease list <dynamic-secret-name>
|
|
```
|
|
|
|
### Flags
|
|
|
|
<Accordion title="--env">
|
|
Used to select the environment name on which actions should be taken. Default
|
|
value: `dev`
|
|
</Accordion>
|
|
|
|
<Accordion title="--path">
|
|
The `--path` flag indicates which project folder dynamic secrets will be injected from.
|
|
|
|
```bash
|
|
# Example
|
|
infisical dynamic-secrets lease list <dynamic-secret-name> --path="/" --env=dev
|
|
```
|
|
|
|
</Accordion>
|
|
|
|
<Accordion title="--projectId">
|
|
The project ID of the dynamic secrets to list leases from. This is required when using a machine identity to authenticate.
|
|
|
|
```bash
|
|
# Example
|
|
infisical dynamic-secrets lease list <dynamic-secret-name> --projectId=<project-id>
|
|
```
|
|
|
|
</Accordion>
|
|
|
|
<Accordion title="--token">
|
|
The authenticated token to list dynamic secret leases. This is required when using a machine identity to authenticate.
|
|
|
|
```bash
|
|
# Example
|
|
infisical dynamic-secrets lease list <dynamic-secret-name> --token=<token>
|
|
```
|
|
|
|
</Accordion>
|
|
</Accordion>
|
|
|
|
<Accordion title="infisical dynamic-secrets lease renew">
|
|
This command is used to renew a lease before it expires.
|
|
|
|
```bash
|
|
$ infisical dynamic-secrets lease renew <lease-id>
|
|
```
|
|
|
|
### Flags
|
|
|
|
<Accordion title="--env">
|
|
Used to select the environment name on which actions should be taken. Default
|
|
value: `dev`
|
|
</Accordion>
|
|
|
|
<Accordion title="--path">
|
|
The `--path` flag indicates which project folder dynamic secrets will be renewed from.
|
|
|
|
```bash
|
|
# Example
|
|
infisical dynamic-secrets lease renew <lease-id> --path="/" --env=dev
|
|
```
|
|
|
|
</Accordion>
|
|
|
|
<Accordion title="--projectId">
|
|
The project ID of the dynamic secret's lease from. This is required when using a machine identity to authenticate.
|
|
|
|
```bash
|
|
# Example
|
|
infisical dynamic-secrets lease renew <lease-id> --projectId=<project-id>
|
|
```
|
|
|
|
</Accordion>
|
|
|
|
<Accordion title="--token">
|
|
The authenticated token to create dynamic secret leases. This is required when using a machine identity to authenticate.
|
|
|
|
```bash
|
|
# Example
|
|
infisical dynamic-secrets lease renew <lease-id> --token=<token>
|
|
```
|
|
|
|
</Accordion>
|
|
|
|
<Accordion title="--ttl">
|
|
The lease lifetime. If not provided, the default TTL of the dynamic secret root credential will be used.
|
|
|
|
```bash
|
|
# Example
|
|
infisical dynamic-secrets lease renew <lease-id> --ttl=<ttl>
|
|
```
|
|
|
|
</Accordion>
|
|
</Accordion>
|
|
|
|
<Accordion title="infisical dynamic-secrets lease delete">
|
|
This command is used to delete a lease.
|
|
|
|
```bash
|
|
$ infisical dynamic-secrets lease delete <lease-id>
|
|
```
|
|
|
|
### Flags
|
|
|
|
<Accordion title="--env">
|
|
Used to select the environment name on which actions should be taken. Default
|
|
value: `dev`
|
|
</Accordion>
|
|
|
|
<Accordion title="--path">
|
|
The `--path` flag indicates which project folder dynamic secrets will be deleted from.
|
|
|
|
```bash
|
|
# Example
|
|
infisical dynamic-secrets lease delete <lease-id> --path="/" --env=dev
|
|
```
|
|
|
|
</Accordion>
|
|
|
|
<Accordion title="--projectId">
|
|
The project ID of the dynamic secret's lease from. This is required when using a machine identity to authenticate.
|
|
|
|
```bash
|
|
# Example
|
|
infisical dynamic-secrets lease delete <lease-id> --projectId=<project-id>
|
|
```
|
|
|
|
</Accordion>
|
|
|
|
<Accordion title="--token">
|
|
The authenticated token to delete dynamic secret leases. This is required when using a machine identity to authenticate.
|
|
|
|
```bash
|
|
# Example
|
|
infisical dynamic-secrets lease delete <lease-id> --token=<token>
|
|
```
|
|
|
|
</Accordion>
|
|
</Accordion>
|