Skip to content

Commit 1e39d3e

Browse files
michelleNitowlson
authored andcommitted
headings and more guidance
Signed-off-by: Michelle Dhanani <[email protected]>
1 parent 689e560 commit 1e39d3e

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

content/spin/v3/variables.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,14 +269,22 @@ Used an API
269269

270270
## Troubleshooting
271271

272+
### Ensure Variables Are Set
273+
272274
If you run into the following error, you've most likely not set the variable, either through the environment variable provider using the `SPIN_VARIABLE_` prefix or through another provider.
273275

274276
```console
275277
Handler returned an error: Error::Provider("no provider resolved required variable \"YOUR_VARIABLE\"")
276278
```
279+
277280
See [Dynamic Application Configuration](./dynamic-configuration#application-variables-runtime-configuration) for information on setting variable values via environment variables, or configuring secure variable providers.
281+
282+
### Ensure Component Can Access Necessary Variables
283+
278284
If you run into the following error, you've most likely not configured the component section in the `spin.toml` to have access to the variable specified.
279285

280286
```console
281287
Handler returned an error: Error::Undefined("no variable for \"<component-id>\".\"your-variable\"")
282-
```
288+
```
289+
290+
To fix this, edit the `spin.toml` and add to the `[component.<component-id>.variables]` table a line such as `<your-variable> = "{{ app-variable }}".` See [above](https://developer.fermyon.com/spin/v3/variables#adding-variables-to-your-applications) for more information.

0 commit comments

Comments
 (0)