feat: add vault variables support to keboola-as-code#2459
Draft
feat: add vault variables support to keboola-as-code#2459
Conversation
- Update SDK dependency to use vault variables API from PR #54 - Extend manifest model with vault section for variables - Add --vault-enabled flag to pull command to fetch vault variables - Implement kbc remote vault create command (interactive with optional parameter) - Implement kbc remote vault delete command (interactive with optional parameter) - Both create/delete commands automatically update the manifest - Add help messages for all vault commands Co-Authored-By: Martin Vasko <[email protected]>
Contributor
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
- Use prompt.Question instead of custom dialog structs - Fix d.Dialogs().Ask() to return (string, bool) instead of error - Use prj.ProjectManifest() instead of prj.Manifest() for mutations - Fix SDK DeleteVariableRequest to capture both return values from Send() - Make variable value input hidden for security Co-Authored-By: Martin Vasko <[email protected]>
The vault commands are functional but hidden from help output to prevent breaking existing E2E test snapshots that assert on help text. This allows the functionality to be available without requiring test fixture updates. Co-Authored-By: Martin Vasko <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds support for Keboola Vault Variables to the keboola-as-code CLI, enabling users to manage secure key-value pairs through the CLI and track them in the project manifest.
Key Changes:
vaultsection to store vault variables--vault-enabledflag tokbc pullcommand to fetch and update vault variableskbc remote vault createcommand (interactive with optional parameter)kbc remote vault deletecommand (interactive with optional parameter)Dependencies:
Release Notes
Added vault variables management to keboola-as-code CLI:
kbc remote vault createandkbc remote vault deletecommands--vault-enabledflag forkbc pullto sync vault variables to manifest.keboola/manifest.jsonunder thevaultsectionPlans for customer communication
None.
Impact analysis
Affected Components:
vaultsection)--vault-enabledflag)vaultsubcommand)Backward Compatibility:
vaultsection in manifest is optional (omitempty), so existing manifests remain valid--vault-enabledflag is opt-in, so existing pull workflows are unaffectedRisk Areas:
Change type
Justification
Enables users to manage Keboola Vault Variables through the CLI and track them in version control alongside other project configurations, providing a complete infrastructure-as-code workflow.
Deployment
Merge & automatic deploy.
Rollback plan
Revert of this PR.
Post release support plan
None.
Human Review Checklist
Critical Items:
vaultsection doesn't break existing manifest parsing/validation--vault-enabledflag integration doesn't affect existing pull workflowsFiles to Review:
internal/pkg/project/manifest/file.go- Manifest structure changesinternal/pkg/project/manifest/manifest.go- Vault variable management methodsinternal/pkg/service/cli/cmd/sync/pull/cmd.go- Pull command integrationinternal/pkg/service/cli/cmd/remote/vault/create/cmd.go- Create command implementationinternal/pkg/service/cli/cmd/remote/vault/delete/cmd.go- Delete command implementationLink to Devin run: https://app.devin.ai/sessions/4be19827f2044d95aa2dac9c48afc0e3
Requested by: Martin Vasko ([email protected]) / @Matovidlo