diff --git a/docs/integrations/platforms/infisical-agent.mdx b/docs/integrations/platforms/infisical-agent.mdx index ba8d04763..b25411c74 100644 --- a/docs/integrations/platforms/infisical-agent.mdx +++ b/docs/integrations/platforms/infisical-agent.mdx @@ -314,19 +314,32 @@ infisical agent --config example-agent-config-file.yaml ```bash listSecrets "" "environment-slug" "" "" ``` - ```bash example-template-usage + ```bash example-template-usage-1 {{- with listSecrets "6553ccb2b7da580d7f6e7260" "dev" "/" `{"recursive": false, "expandSecretReferences": true}` }} {{- range . }} {{ .Key }}={{ .Value }} {{- end }} {{- end }} ``` + ```bash example-template-usage-2 +{{- with secret "da8056c8-01e2-4d24-b39f-cb4e004b8d44" "staging" "/" `{"recursive": true, "expandSecretReferences": true}` }} +{{- range . }} +{{- if eq .SecretPath "/"}} +{{ .Key }}={{ .Value }} +{{- else}} +{{ .SecretPath }}/{{ .Key }}={{ .Value }} +{{- end}} +{{- end }} +{{- end }} + ``` + + **Function name**: listSecrets **Description**: This function can be used to render the full list of secrets within a given project, environment and secret path. -An optional JSON argument is also available. It includes the properties `recursive`, which defaults to false, and `expandSecretReferences`, which defaults to true and expands the returned +An optional JSON argument is also available. It includes the properties `recursive`, which defaults to false, and `expandSecretReferences`, which defaults to true and expands the returned secrets. **Returns**: A single secret object with the following keys `Key, WorkspaceId, Value, SecretPath, Type, ID, and Comment`