> ## Documentation Index
> Fetch the complete documentation index at: https://upstash.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# upstash_redis_database

> Create and manage Upstash Redis databases.

```hcl example.tf theme={"system"}
resource "upstash_redis_database" "exampleDB" {
  database_name = "Terraform DB6"
  region        = "eu-west-1"
  tls           = "true"
  multizone     = "true"
}
```

## Schema

### Required

**database\_name** `string` *required*

Name of the database

**region** `string` *required*

Region of the database. Possible values are: `global`, `eu-west-1`,
`us-east-1`, `us-west-1`, `ap-northeast-1` , `eu-central1`

### Optional

**auto\_scale** `bool`

Upgrade to higher plans automatically when it hits quotas

**eviction** `bool`

Enable eviction, to evict keys when your database reaches the max size

**primary\_region** `string`

Primary region for the database (Only works if region='global'. Can be one of
\[us-east-1, us-west-1, us-west-2, eu-central-1, eu-west-1, sa-east-1,
ap-southeast-1, ap-southeast-2])

**read\_regions** `set(string)`

Read regions for the database (Only works if region='global' and
primary\_region is set. Can be any combination of \[us-east-1, us-west-1,
us-west-2, eu-central-1, eu-west-1, sa-east-1, ap-southeast-1,
ap-southeast-2], excluding the one given as primary.)

**tls** `bool`

When enabled, data is encrypted in transit. (If changed to false from true,
results in deletion and recreation of the resource)

### Read-Only

**creation\_time** `number`

Creation time of the database

**database\_id** `string`

Unique Database ID for created database

**database\_type** `string`

Type of the database

**db\_daily\_bandwidth\_limit** `number`

Daily bandwidth limit for the database

**db\_disk\_threshold** `number`

Disk threshold for the database

**db\_max\_clients** `number`

Max clients for the database

**db\_max\_commands\_per\_second** `number`

Max commands per second for the database

**db\_max\_entry\_size** `number`

Max entry size for the database

**db\_max\_request\_size** `number`

Max request size for the database

**db\_memory\_threshold** `number`

Memory threshold for the database

**endpoint** `string`

Database URL for connection

**id** `string`

The ID of this resource.

**password** `string`

Password of the database

**port** `number`

Port of the endpoint

**read\_only\_rest\_token** `string`

Rest Token for the database.

**rest\_token** `string`

Rest Token for the database.

**state** `string`

State of the database

**user\_email** `string`

User email for the database


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.