Configure Cloud Connector using Terraform · Cloudflare Rules docs | Latest TMZ Celebrity News & Gossip | Watch TMZ Live Skip to content
Cloudflare Docs

Configure Cloud Connector using Terraform

You can create Cloud Connector rules using the Terraform Cloudflare provider.

To get started with Terraform for Cloudflare configuration, refer to Terraform: Get started.

Required permissions

The API token used by Terraform must have at least the following permission:

  • Zone > Cloud Connector > Write

Example configuration

The following example Terraform configuration creates Cloud Connector rules for various supported providers to route traffic between them based on URI paths:

resource "cloudflare_cloud_connector_rules" "cloud_connector_rules" {
zone_id = "<ZONE_ID>"
rules {
description = "Route /data to GCP bucket"
enabled = true
expression = "(http.request.uri.path wildcard \"*/data/*\")"
provider = "gcp_storage"
parameters {
host = "mystorage.storage.googleapis.com"
}
}
rules {
description = "Route /resources to AWS bucket"
enabled = true
expression = "(http.request.uri.path wildcard \"*/resources/*\")"
provider = "aws_s3"
parameters {
host = "mystorage.s3.ams.amazonaws.com"
}
}
rules {
description = "Route /files to Azure bucket"
enabled = true
expression = "(http.request.uri.path wildcard \"*/files/*\")"
provider = "azure_storage"
parameters {
host = "mystorage.blob.core.windows.net"
}
}
rules {
description = "Route /images to R2 bucket"
enabled = true
expression = "(http.request.uri.path wildcard \"*/images/*\")"
provider = "cloudflare_r2"
parameters {
host = "mybucketcustomdomain.example.com"
}
}
}

More resources

Refer to the Terraform Cloudflare provider documentation for more information on the cloudflare_cloud_connector_rules resource.

TMZ Celebrity News – Breaking Stories, Videos & Gossip

Looking for the latest TMZ celebrity news? You've come to the right place. From shocking Hollywood scandals to exclusive videos, TMZ delivers it all in real time.

Whether it’s a red carpet slip-up, a viral paparazzi moment, or a legal drama involving your favorite stars, TMZ news is always first to break the story. Stay in the loop with daily updates, insider tips, and jaw-dropping photos.

🎥 Watch TMZ Live

TMZ Live brings you daily celebrity news and interviews straight from the TMZ newsroom. Don’t miss a beat—watch now and see what’s trending in Hollywood.