You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/spin/v3/variables.md
+9-1Lines changed: 9 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -269,14 +269,22 @@ Used an API
269
269
270
270
## Troubleshooting
271
271
272
+
### Ensure Variables Are Set
273
+
272
274
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.
273
275
274
276
```console
275
277
Handler returned an error: Error::Provider("no provider resolved required variable \"YOUR_VARIABLE\"")
276
278
```
279
+
277
280
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
+
278
284
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.
279
285
280
286
```console
281
287
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