Enable loading Secret Store configuration through environment variables#1540
Merged
Enable loading Secret Store configuration through environment variables#1540
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR enables loading Secret Store configuration through environment variables by adding support for an env field in the CLI's manifest schema. This complements a related Viceroy PR and allows secrets to be sourced from environment variables in addition to files and inline data.
- Added
envfield toSecretStoreArrayEntrystruct to support environment variable-based secret loading - Updated TOML marshaling logic to include the new
envfield when present - Added test fixture data to verify the
envfield persists through manifest updates
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| pkg/manifest/local_server.go | Added Env field to SecretStoreArrayEntry struct definition |
| pkg/manifest/file.go | Updated TOML marshaling to include env field when present |
| pkg/manifest/testdata/fastly-viceroy-update.toml | Added test case with env field configuration |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
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.
Change summary
This PR complements fastly/Viceroy#527 enabling the CLI's manifest schema to recognize the env field in Secret Stores.
New Feature Submissions:
Changes to Core Features:
Have you written new tests for your core changes, as applicable?
The test fixture
fastly-viceroy-update.tomlhas been updated to make sure that manifest updates persist the field.Have you successfully run tests with your changes locally?
Are there any considerations that need to be addressed for release?
This relates to fastly/Viceroy#527 but doesn't have to wait for it before releasing this.