Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/content/docs/rules/cloud-connector/create-terraform.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ head:
content: Configure Cloud Connector using Terraform
---

import { Render } from "~/components";

You can create Cloud Connector rules using the [Terraform Cloudflare provider](https://registry.terraform.io/providers/cloudflare/cloudflare/latest).

To get started with Terraform for Cloudflare configuration, refer to [Terraform: Get started](/terraform/installing/).
Expand All @@ -21,6 +23,8 @@ The [API token](/fundamentals/api/get-started/create-token/) used by Terraform m

## Example configuration

<Render file="v4-code-snippets" product="terraform" />

The following example Terraform configuration creates Cloud Connector rules for various [supported providers](/rules/cloud-connector/providers/) to route traffic between them based on URI paths:

```tf
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ description: Route requests with a URI path starting with `/images` to a specifi

import { Render } from "~/components";

<Render file="v4-code-snippets" product="terraform" />

The following example defines a single Cloud Connector rule for a zone using Terraform. The rule routes requests to `/images` on your domain to an AWS S3 bucket.

```tf
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ description: Create a configuration rule using Terraform to turn off Email

import { Render } from "~/components";

<Render file="v4-code-snippets" product="terraform" />

The following example defines a single configuration rule for a zone using Terraform. The rule disables Email Obfuscation and Browser Integrity Check for API requests.

```tf
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ description: Create an origin rule using Terraform to override the `Host`

import { Render } from "~/components";

<Render file="v4-code-snippets" product="terraform" />

The following example defines a single origin rule for a zone using Terraform. The rule overrides the `Host` header, the resolved hostname, and the destination port of API requests.

```tf
Expand Down
4 changes: 4 additions & 0 deletions src/content/docs/rules/snippets/create-terraform.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,16 @@ head:
content: Configure Snippets using Terraform
---

import { Render } from "~/components";

You can create Snippets using the [Terraform Cloudflare provider](https://registry.terraform.io/providers/cloudflare/cloudflare/latest).

To get started with Terraform for Cloudflare configuration, refer to [Terraform: Get started](/terraform/installing/).

## Example configuration

<Render file="v4-code-snippets" product="terraform" />

The following example Terraform configuration creates a snippet and an associated snippet rule that defines when the snippet code will run. The snippet code is loaded from the `file1.js` file in your machine.

```tf
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ sidebar:

import { Render } from "~/components";

<Render file="v4-code-snippets" product="terraform" />

The following example defines a single redirect rule for a zone using Terraform. The rule creates a static URL redirect for visitors requesting the contacts page using an old URL.

```tf
Expand Down