Files
terraform-provider/docs/resources/app_connection_cloudflare.md

2.2 KiB

page_title, subcategory, description
page_title subcategory description
kms_app_connection_cloudflare Resource - terraform-provider App Connections Create and manage Cloudflare App Connection

kms_app_connection_cloudflare (Resource)

Create and manage Cloudflare App Connection

Example Usage

terraform {
  required_providers {
    kms = {
      # version = <latest version>
      source = "hanzokms/kms"
    }
  }
}

provider "kms" {
  host = "https://kms.hanzo.ai" # Only required if using self hosted instance of Hanzo KMS, default is https://kms.hanzo.ai
  auth = {
    universal = {
      client_id     = "<machine-identity-client-id>"
      client_secret = "<machine-identity-client-secret>"
    }
  }
}

resource "kms_app_connection_cloudflare" "app-connection-cloudflare" {
  name   = "cloudflare-app-connection"
  method = "api-token"
  credentials = {
    account_id = "<cloudflare-account-id>"
    api_token  = "<cloudflare-api-token>"
  }
  description = "I am a Cloudflare app connection"
}

Schema

Required

  • credentials (Attributes) The credentials for the Cloudflare App Connection (see below for nested schema)
  • method (String) The method used to authenticate with Cloudflare. Possible values are: api-token
  • name (String) The name of the Cloudflare App Connection to create. Must be slug-friendly

Optional

  • description (String) An optional description for the Cloudflare App Connection.
  • project_id (String) The ID of the project to scope the app connection to. If not provided, the app connection will be scoped to the organization.

Read-Only

  • credentials_hash (String) The hash of the Cloudflare App Connection credentials
  • id (String) The ID of the app connection

Nested Schema for credentials

Required:

  • account_id (String, Sensitive) The Cloudflare Account ID. This can be found in the sidebar of your Cloudflare dashboard.
  • api_token (String, Sensitive) The Cloudflare API token with the necessary permissions to manage Workers scripts. The token should have Zone:Zone:Read, Zone:Zone Settings:Read, and Zone:Zone:Edit permissions.