feat(export): add -Prefix parameter to Export-InfisicalSecrets

Adds an optional [string] -Prefix parameter that prepends the supplied
string to every emitted variable name, regardless of -Format
(Json/Yaml/Xml/Env/EnvironmentVariables). When omitted or empty the
exporter buffer is forwarded unchanged (no-op).

Implementation clones each InfisicalSecret with SecretName = Prefix +
SecretName so the caller's pipeline objects are never mutated; the
SecureString and Tags/SecretMetadata array references are shared
(read-only usage downstream).

Also updates the cmdlet help XML description + adds a -Prefix example,
and reflects the new parameter in docs/DesignSpec.md.
This commit is contained in:
GraceSolutions
2026-06-06 17:37:56 -04:00
parent 0fdafeca72
commit 318db70480
3 changed files with 44 additions and 3 deletions
+2 -1
View File
@@ -1213,7 +1213,8 @@ Export-InfisicalSecrets `
[-Path <FileInfo>] `
[-Scope <Process|User|Machine>] `
[-Force] `
[-Encoding <UTF8|UTF8Bom|Unicode>]
[-Encoding <UTF8|UTF8Bom|Unicode>] `
[-Prefix <string>]
```
## Parameter Rules