# Redis

Managed Redis-compatible cache instances. Backed by [Valkey](https://valkey.io), the BSD-3-Clause open-source fork of Redis 7.2 — works with any Redis client (`ioredis`, `node-redis`, `redis-cli`).

```hcl
redis "cache" {}
```

Reference redis attributes in env blocks:

```hcl
service "api" {
  build = build.api
  command = "./api"

  endpoint {
    public = true
  }

  env = {
    REDIS_URL = redis.cache.url
  }
}

redis "cache" {}
```

## Available redis attributes

- `url` - Full connection string (e.g., `redis://:password@host:6379`)
- `host` - Redis host
- `port` - Redis port
- `password` - Redis password for authentication
