createDatabase
Last updated: January 27, 2026
Creates a new database in Snowflake. Supports creating standard databases, transient databases, and replica databases from primary databases in other accounts.
Note: Automatic rollback drops the database.
Known limitation: This change type does not support database inspection features (snapshot, diff, diff-changelog, and generate-changelog commands).
Available attributes
Attribute | Type | Description | Required |
|---|---|---|---|
| String | Name of the database to create | Yes |
| Boolean | Replace the database if it already exists using | No |
| Boolean | Only create the database if it doesn't exist using | No |
| String | Comment describing the database | No |
| Nested | Configuration for standard/transient database | No* |
| Nested | Configuration for replica database | No* |
* replaceIfExists and ifNotExists are mutually exclusive. Exactly one of standardDatabase or replicaDatabase must be specified.
standardDatabase attributes
Attribute | Type | Description | Required |
|---|---|---|---|
| Boolean | Create a transient database | No |
| Integer | Days to retain data for Time Travel (0-90) | No |
| Integer | Maximum days Time Travel retention can be extended | No |
| String | Default collation for objects in the database | No |
| String | Storage format policy ( | No |
| String | External volume for Iceberg tables | No |
| String | Catalog integration for Iceberg tables | No |
| String | Replace invalid UTF-8 characters in Iceberg tables | No |
| Nested | Key-value pairs of tags to apply | No |
| Nested | Key-value pairs mapping contact purposes to names | No |
standardDatabase nested elements
tags - Key-value pairs of tags to apply:
Attribute | Type | Description | Required |
|---|---|---|---|
key | String | Tag name (simple, schema-qualified, or fully-qualified) | Yes |
value | String | Tag value | Yes |
Contacts - Key-value pairs mapping contact purposes to contact names:
Attribute | Type | Description | Required |
|---|---|---|---|
key | String | Contact purpose: `steward`, `support`, or `approver` | Yes |
value | String | Name of existing contact object (simple, schema, or fully qualified) | Yes |
replicaDatabase attributes
Attribute | Type | Description | Required |
|---|---|---|---|
| String | Account identifier of the primary database | Yes |
| String | Name of the primary database to replicate | Yes |
| Integer | Days to retain data for Time Travel | No |
| Integer | Maximum days Time Travel retention can be extended | No |