You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add --dry-run to secrets set/delete to preview changes before applying #331
infisical secrets set and infisical secrets delete apply changes to the backend immediately — there's no way to preview exactly what will be created, updated, or deleted first. This matters most in CI/scripted secret-rotation pipelines, where a preview step (à la terraform plan) is a standard safety net before mutating state.
Proposal
Add a --dry-run flag to infisical secrets set and infisical secrets delete (and optionally folders create/folders delete) that:
Computes the exact set of operations that would be performed (create / update / delete, with masked values) using the existing logic that already separates "compute operations" from "execute + print" in packages/cmd/secrets.go.
Prints the same table/JSON output the real run would produce, but skips the actual SetRawSecrets/CallDeleteSecretsRawV3 API call.
Exits 0 without mutating anything.
Scope
Since secrets.go already builds a secretOperations-style list before calling the API and before printing results, this should be a small, additive change: gate the actual API call behind if !dryRun, and note in the output that it was a dry run. No changes needed to the API client or other commands. Happy to open a PR.
Activity