Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow JSON files as input for Secrets Stores and KVStores #364

Open
GeeWee opened this issue May 2, 2024 · 13 comments · May be fixed by #365
Open

Allow JSON files as input for Secrets Stores and KVStores #364

GeeWee opened this issue May 2, 2024 · 13 comments · May be fixed by #365

Comments

@GeeWee
Copy link

GeeWee commented May 2, 2024

Currently the fastly.toml specification allows you to pass in a JSON file for config stores (and earlier, also for dictionaries)

Something like that is extremely handy to be able to do, to e.g. share configuration across multiple fastly.tomls for environments, autogenerating these values from other scripts, not having to check them into CI etc.

Is that something you might be interested in adding back?

@fgsch
Copy link
Member

fgsch commented May 2, 2024

This would be a great addition. Would you be interested in opening a PR for this?

@GeeWee
Copy link
Author

GeeWee commented May 2, 2024

I think I could try to find time for that if it would end up being accepted?

@fgsch
Copy link
Member

fgsch commented May 2, 2024

@GeeWee I'm pretty sure that'd be the case 👍

@GeeWee
Copy link
Author

GeeWee commented May 2, 2024

Okay, can you check? I'd hate to do the work and then have it languish :)

Do you have a proposal for the user-facing API in the TOML file? I'd like to lean against e.g. ConfigStores, but I think that's slightly harder, as that uses the format: "inline-toml" for keys defined inside the toml file.

@fgsch
Copy link
Member

fgsch commented May 2, 2024

Sorry, looking at Viceroy I can see support for the file stanza for the secret store (#210) and kv store (originally added as path in #167 and later renamed for consistency in #206).

Is this what you wanted?

@GeeWee
Copy link
Author

GeeWee commented May 3, 2024

I don't think so based at the documentation and the PR. I want to be able to specify a file with all my key-values, so e.g. a JSON object or similar, while the file property currently just allows me to specify the contents for a specific key - if I understand correctly?

@fgsch
Copy link
Member

fgsch commented May 3, 2024

Ok, if you want all your key-values, that might require a bit of internal discussion as it is currently not part of the spec.
Sorry for the initial misunderstanding.

@GeeWee GeeWee linked a pull request May 3, 2024 that will close this issue
@GeeWee
Copy link
Author

GeeWee commented May 3, 2024

Any way I can push on that discussion, or if you have an idea about a timeline? This would bee extremely handy for us, and I was maybe a little too eager, so I already did the work to implement it in #365 😅

@kpfleming
Copy link
Contributor

As I noted in the PR, we're just about to embark on a process to redesign the schema for fastly.toml to make this sort of thing easier to do (and make it more flexible as well), so I'd like to hold off a few weeks before we continue this discussion to see how this feature fits with that. Once we have an initial proposal we'll post it on our community forum (https://community.fastly.com) to get input from you and others who use Viceroy, and I'll update this ticket when that happens.

@joeshaw
Copy link
Member

joeshaw commented May 9, 2024

Related to (but distinct from) #359

@GeeWee
Copy link
Author

GeeWee commented Jun 11, 2024

@kpfleming do you have a rough timeline for this redesign?

@kpfleming
Copy link
Contributor

There should be a post on our community forum in the next day or two, apologies for it taking much longer than planned to get the process started.

@GeeWee
Copy link
Author

GeeWee commented Jun 25, 2024

I'm unable to find the community forum post - any chance you have a link handy? :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants