spinframework / spinframework/spin
Provide multiple entries as a variable for lists in 'spin.toml'
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 6.5k
- Forks
- 310
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 24
Description
Considering I have an application, which needs an undefined number of entries in allowed_outbound_hosts passed in as a variable.
What I would like to be able to do:
[variables]
allowed_hosts = { default = "https://fermyon.com" }
...
[component.foo]
allowed_outbound_hosts = "[{{ allowed_hosts }}]"
And provide something like this:
SPIN_VARIABLE_ALLOWED_HOSTS="https://www.google.com","https://www.fermyon.com" spin up
A scenario for doing this, is if you have multiple endpoints you need to connect to, but want to make it a runtiem decision what those endpoints are.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing how variables in spin.toml are parsed and how spin up handles component.foo.allowed_outbound_hosts. Compare the requested SPIN_VARIABLE_ALLOWED_HOSTS input with the current list handling. Done means an undefined number of runtime-supplied hosts can be applied to allowed_outbound_hosts, with the behavior verified by tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100