Skip to content
Start here

Hyperdrive

HyperdriveConfigs

resource cloudflare_hyperdrive_config

required Expand Collapse
account_id: String

Define configurations using a unique string identifier.

name: String

The name of the Hyperdrive configuration. Used to identify the configuration in the Cloudflare dashboard and API.

origin: Attributes
database: String

Set the name of your origin database.

host: String

Defines the host (hostname or IP) of your origin database.

password: String

Set the password needed to access your origin database. The API never returns this write-only value.

port?: Int64

Defines the port of your origin database. Defaults to 5432 for PostgreSQL or 3306 for MySQL if not specified.

scheme: String

Specifies the URL scheme used to connect to your origin database.

user: String

Set the user of your origin database.

access_client_id?: String

Defines the Client ID of the Access token to use when connecting to the origin database.

access_client_secret?: String

Defines the Client Secret of the Access Token to use when connecting to the origin database. The API never returns this write-only value.

optional Expand Collapse
origin_connection_limit?: Int64

The (soft) maximum number of connections the Hyperdrive is allowed to make to the origin database.

Maximum allowed: 20 for free tier accounts, 100 for paid tier accounts. If not specified, defaults to 20 for free tier and 60 for paid tier. Contact Cloudflare if you need a higher limit.

caching?: Attributes
disabled?: Bool

Set to true to disable caching of SQL responses. Default is false.

max_age?: Int64

Specify the maximum duration (in seconds) items should persist in the cache. Defaults to 60 seconds if not specified.

stale_while_revalidate?: Int64

Specify the number of seconds the cache may serve a stale response. Defaults to 15 seconds if not specified.

mtls?: Attributes
ca_certificate_id?: String

Define CA certificate ID obtained after uploading CA cert.

mtls_certificate_id?: String

Define mTLS certificate ID obtained after uploading client cert.

sslmode?: String

Set SSL mode to 'require', 'verify-ca', or 'verify-full' to verify the CA.

computed Expand Collapse
id: String

Define configurations using a unique string identifier.

created_on: Time

Defines the creation time of the Hyperdrive configuration.

modified_on: Time

Defines the last modified time of the Hyperdrive configuration.

cloudflare_hyperdrive_config

resource "cloudflare_hyperdrive_config" "example_hyperdrive_config" {
  account_id = "023e105f4ecef8ad9ca31a8372d0c353"
  name = "example-hyperdrive"
  origin = {
    database = "postgres"
    host = "database.example.com"
    password = "password"
    port = 5432
    scheme = "postgres"
    user = "postgres"
  }
  caching = {
    disabled = true
  }
  mtls = {
    ca_certificate_id = "00000000-0000-0000-0000-0000000000"
    mtls_certificate_id = "00000000-0000-0000-0000-0000000000"
    sslmode = "verify-full"
  }
  origin_connection_limit = 60
}

data cloudflare_hyperdrive_config

required Expand Collapse
hyperdrive_id: String

Define configurations using a unique string identifier.

account_id: String

Define configurations using a unique string identifier.

computed Expand Collapse
id: String

Define configurations using a unique string identifier.

created_on: Time

Defines the creation time of the Hyperdrive configuration.

modified_on: Time

Defines the last modified time of the Hyperdrive configuration.

name: String

The name of the Hyperdrive configuration. Used to identify the configuration in the Cloudflare dashboard and API.

origin_connection_limit: Int64

The (soft) maximum number of connections the Hyperdrive is allowed to make to the origin database.

Maximum allowed: 20 for free tier accounts, 100 for paid tier accounts. If not specified, defaults to 20 for free tier and 60 for paid tier. Contact Cloudflare if you need a higher limit.

caching: Attributes
disabled: Bool

Set to true to disable caching of SQL responses. Default is false.

max_age: Int64

Specify the maximum duration (in seconds) items should persist in the cache. Defaults to 60 seconds if not specified.

stale_while_revalidate: Int64

Specify the number of seconds the cache may serve a stale response. Defaults to 15 seconds if not specified.

mtls: Attributes
ca_certificate_id: String

Define CA certificate ID obtained after uploading CA cert.

mtls_certificate_id: String

Define mTLS certificate ID obtained after uploading client cert.

sslmode: String

Set SSL mode to 'require', 'verify-ca', or 'verify-full' to verify the CA.

origin: Attributes
database: String

Set the name of your origin database.

host: String

Defines the host (hostname or IP) of your origin database.

password: String

Set the password needed to access your origin database. The API never returns this write-only value.

port: Int64

Defines the port of your origin database. Defaults to 5432 for PostgreSQL or 3306 for MySQL if not specified.

scheme: String

Specifies the URL scheme used to connect to your origin database.

user: String

Set the user of your origin database.

access_client_id: String

Defines the Client ID of the Access token to use when connecting to the origin database.

access_client_secret: String

Defines the Client Secret of the Access Token to use when connecting to the origin database. The API never returns this write-only value.

cloudflare_hyperdrive_config

data "cloudflare_hyperdrive_config" "example_hyperdrive_config" {
  account_id = "023e105f4ecef8ad9ca31a8372d0c353"
  hyperdrive_id = "023e105f4ecef8ad9ca31a8372d0c353"
}

data cloudflare_hyperdrive_configs

required Expand Collapse
account_id: String

Define configurations using a unique string identifier.

optional Expand Collapse
max_items?: Int64

Max items to fetch, default: 1000

computed Expand Collapse
result: List[Attributes]

The items returned by the data source

id: String

Define configurations using a unique string identifier.

name: String

The name of the Hyperdrive configuration. Used to identify the configuration in the Cloudflare dashboard and API.

origin: Attributes
database: String

Set the name of your origin database.

host: String

Defines the host (hostname or IP) of your origin database.

password: String

Set the password needed to access your origin database. The API never returns this write-only value.

port: Int64

Defines the port of your origin database. Defaults to 5432 for PostgreSQL or 3306 for MySQL if not specified.

scheme: String

Specifies the URL scheme used to connect to your origin database.

user: String

Set the user of your origin database.

access_client_id: String

Defines the Client ID of the Access token to use when connecting to the origin database.

access_client_secret: String

Defines the Client Secret of the Access Token to use when connecting to the origin database. The API never returns this write-only value.

caching: Attributes
disabled: Bool

Set to true to disable caching of SQL responses. Default is false.

max_age: Int64

Specify the maximum duration (in seconds) items should persist in the cache. Defaults to 60 seconds if not specified.

stale_while_revalidate: Int64

Specify the number of seconds the cache may serve a stale response. Defaults to 15 seconds if not specified.

created_on: Time

Defines the creation time of the Hyperdrive configuration.

modified_on: Time

Defines the last modified time of the Hyperdrive configuration.

mtls: Attributes
ca_certificate_id: String

Define CA certificate ID obtained after uploading CA cert.

mtls_certificate_id: String

Define mTLS certificate ID obtained after uploading client cert.

sslmode: String

Set SSL mode to 'require', 'verify-ca', or 'verify-full' to verify the CA.

origin_connection_limit: Int64

The (soft) maximum number of connections the Hyperdrive is allowed to make to the origin database.

Maximum allowed: 20 for free tier accounts, 100 for paid tier accounts. If not specified, defaults to 20 for free tier and 60 for paid tier. Contact Cloudflare if you need a higher limit.

cloudflare_hyperdrive_configs

data "cloudflare_hyperdrive_configs" "example_hyperdrive_configs" {
  account_id = "023e105f4ecef8ad9ca31a8372d0c353"
}