From ed7fc0e5cdbf4eff3062df6e24c9facd9f6e6e09 Mon Sep 17 00:00:00 2001 From: = Date: Fri, 15 Nov 2024 20:33:06 +0530 Subject: [PATCH] docs: updated dynamic secret command cli docs --- docs/cli/commands/dynamic-secrets.mdx | 293 ++++++++++++++++++++++++++ docs/mint.json | 1 + 2 files changed, 294 insertions(+) create mode 100644 docs/cli/commands/dynamic-secrets.mdx diff --git a/docs/cli/commands/dynamic-secrets.mdx b/docs/cli/commands/dynamic-secrets.mdx new file mode 100644 index 0000000000..22dbecb8bb --- /dev/null +++ b/docs/cli/commands/dynamic-secrets.mdx @@ -0,0 +1,293 @@ +--- +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 + + + Use this command to print out all of the dynamic secrets in your project. + +```bash +$ infisical dynamic-secrets +``` + +### Environment variables + + + 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= --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. +``` + + + + + 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 +``` + + + +### Flags + + + The project ID to fetch dynamic secrets from. This is required when using a machine identity to authenticate. + +```bash +# Example +infisical dynamic-secrets --projectId= +``` + + + + + The authenticated token to fetch dynamic secrets from. This is required when using a machine identity to authenticate. + +```bash +# Example +infisical dynamic-secrets --token= +``` + + + + + Used to select the environment name on which actions should be taken. Default + value: `dev` + + + + Use to select the project folder on which dynamic secrets will be accessed. + +```bash +# Example +infisical dynamic-secrets --path="/" --env=dev +``` + + + + + This command is used to create a new lease for a dynamic secret. + +```bash +$ infisical dynamic-secrets lease create +``` + +### Flags + + + Used to select the environment name on which actions should be taken. Default + value: `dev` + + + + 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 +``` + + + + + The `--path` flag indicates which project folder dynamic secrets will be injected from. + +```bash +# Example +infisical dynamic-secrets lease create --path="/" --env=dev +``` + + + + + 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 --projectId= +``` + + + + + 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 --token= +``` + + + + + 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 --ttl= +``` + + + + + + This command is used to list leases for a dynamic secret. + +```bash +$ infisical dynamic-secrets lease list +``` + +### Flags + + + Used to select the environment name on which actions should be taken. Default + value: `dev` + + + + The `--path` flag indicates which project folder dynamic secrets will be injected from. + +```bash +# Example +infisical dynamic-secrets lease list --path="/" --env=dev +``` + + + + + 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 --projectId= +``` + + + + + 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 --token= +``` + + + + + + This command is used to renew a lease before it expires. + +```bash +$ infisical dynamic-secrets lease renew +``` + +### Flags + + + Used to select the environment name on which actions should be taken. Default + value: `dev` + + + + The `--path` flag indicates which project folder dynamic secrets will be renewed from. + +```bash +# Example +infisical dynamic-secrets lease renew --path="/" --env=dev +``` + + + + + 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 --projectId= +``` + + + + + 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 --token= +``` + + + + + 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 --ttl= +``` + + + + + + This command is used to delete a lease. + +```bash +$ infisical dynamic-secrets lease delete +``` + +### Flags + + + Used to select the environment name on which actions should be taken. Default + value: `dev` + + + + The `--path` flag indicates which project folder dynamic secrets will be deleted from. + +```bash +# Example +infisical dynamic-secrets lease delete --path="/" --env=dev +``` + + + + + 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 --projectId= +``` + + + + + 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 --token= +``` + + + diff --git a/docs/mint.json b/docs/mint.json index f070ae88a2..ad41b22db6 100644 --- a/docs/mint.json +++ b/docs/mint.json @@ -314,6 +314,7 @@ "cli/commands/init", "cli/commands/run", "cli/commands/secrets", + "cli/commands/dynamic-secrets", "cli/commands/export", "cli/commands/token", "cli/commands/service-token",