# KV Store Runtime Config Sketch
## Runtime config
:::info
Fleshing out this feature here: https://hackmd.io/@lann/BJQL-0Bjj
:::
```toml
[config]
vault = { default = "bar" }
[[config_provider]]
type = "vault"
// ...
[[kv_store]]
name = "cache"
type = "redis"
// Design option: {{ redis_username }}, etc. here could be filled in from config_provider(s)
url = "redis://{{ redis_username }}:{{ redis_password }}@{{ redis_host }}/"
[[kv_store]]
name = "user-data"
type = "dynamo"
host = "dynamo.amazon.com"
username = "fermyon-user-123"
password = "secret"
```
## Spin Manifest
```toml=
[[component]]
...
kv-stores = ["cache", "user-data"]
// Design option: name a default kv store in the manifest rather than the guest code; this may not make sense looking forward to the component model WASI-KV proposal
default-kv-store = "user-data"
```
## Rust SDK Example
```rust
// Matches on config `name = "user-data"`
let conn = spin_sdk::kv::open("user-data")?;
let val = conn.get("key")?;
```