mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-09-22 13:39:35 +00:00
add example with path
This commit is contained in:
@@ -314,19 +314,32 @@ infisical agent --config example-agent-config-file.yaml
|
|||||||
```bash
|
```bash
|
||||||
listSecrets "<project-id>" "environment-slug" "<secret-path>" "<optional-modifier>"
|
listSecrets "<project-id>" "environment-slug" "<secret-path>" "<optional-modifier>"
|
||||||
```
|
```
|
||||||
```bash example-template-usage
|
```bash example-template-usage-1
|
||||||
{{- with listSecrets "6553ccb2b7da580d7f6e7260" "dev" "/" `{"recursive": false, "expandSecretReferences": true}` }}
|
{{- with listSecrets "6553ccb2b7da580d7f6e7260" "dev" "/" `{"recursive": false, "expandSecretReferences": true}` }}
|
||||||
{{- range . }}
|
{{- range . }}
|
||||||
{{ .Key }}={{ .Value }}
|
{{ .Key }}={{ .Value }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- 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
|
**Function name**: listSecrets
|
||||||
|
|
||||||
**Description**: This function can be used to render the full list of secrets within a given project, environment and secret path.
|
**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`
|
**Returns**: A single secret object with the following keys `Key, WorkspaceId, Value, SecretPath, Type, ID, and Comment`
|
||||||
|
|||||||
Reference in New Issue
Block a user