Skip to content

Commit

Permalink
headings and more guidance
Browse files Browse the repository at this point in the history
Signed-off-by: Michelle Dhanani <[email protected]>
  • Loading branch information
michelleN committed Nov 15, 2024
1 parent 349d3f6 commit 76c2736
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion content/spin/v3/variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -269,14 +269,22 @@ Used an API

## Troubleshooting

### Ensure Variables Are Set

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.

```console
Handler returned an error: Error::Provider("no provider resolved required variable \"YOUR_VARIABLE\"")
```

See [Dynamic Application Configuration](./dynamic-configuration#application-variables-runtime-configuration) for information on setting variable values via environment variables, or configuring secure variable providers.

### Ensure Component Can Access Necessary Variables

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.

```console
Handler returned an error: Error::Undefined("no variable for \"<component-id>\".\"your-variable\"")
```
```

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 comments on commit 76c2736

Please sign in to comment.