Database Destinations

A Database Destination lets an Automation append rows to an existing table. Each destination references a credential in the Secret Store.

Resource Schema

Required

PropertyDescription
name
String
Name of the destination.
provider_
String
Database provider.
Possible values: snowflake, bigquery, supabase, postgresql, mysql
config
Object
Provider settings for the destination. Use the schema matching provider. The connection address and table are fixed after creation.
secret_id
Int64
ID of a Secret in the same Workspace. Use a Token Secret for Snowflake, a service account Key/Value Secret for BigQuery, or a Username/Password Secret for a database login.

Optional

PropertyDescription
workspace_id
Int64
Workspace ID. 0 means the default workspace.

Read Only

PropertyDescription
id
Int64
Database Destination ID.
created_at
String
When the destination was created.
updated_at
String
When the destination was last updated.

Example Resource

resource "files_database_destination" "example_database_destination" {
  name         = "Orders"
  provider_    = "snowflake"
  config       = {
    account_identifier = "value"
    database_name      = "value"
    schema_name        = "value"
    table_name         = "value"
  }
  secret_id    = 1
  workspace_id = 1
}

Resource Import

This Resource supports importing using the following syntax:

Example Import Command

# Database Destinations can be imported by specifying the id.
terraform import files_database_destination.example_database_destination 1

Data Source Schema

Required

PropertyDescription
id
Int64
Database Destination ID.

Read Only

PropertyDescription
workspace_id
Int64
Workspace ID. 0 means the default workspace.
name
String
Name of the destination.
provider_
String
Database provider.
Possible values: snowflake, bigquery, supabase, postgresql, mysql
config
Object
Provider settings for the destination. Use the schema matching provider. The connection address and table are fixed after creation.
secret_id
Int64
ID of a Secret in the same Workspace. Use a Token Secret for Snowflake, a service account Key/Value Secret for BigQuery, or a Username/Password Secret for a database login.
created_at
String
When the destination was created.
updated_at
String
When the destination was last updated.

Example Data Source

data "files_database_destination" "example_database_destination" {
  id = 1
}