Skip to content

Commit 4cdbcb8

Browse files
committed
Added note about V4 code snippets
1 parent 1ad7ad6 commit 4cdbcb8

File tree

6 files changed

+24
-0
lines changed

6 files changed

+24
-0
lines changed

src/content/docs/terraform/tutorial/add-page-rules.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ In the [Configure HTTPS settings](/terraform/tutorial/configure-https-settings/)
1212

1313
Specifically, you will increase the security level for a URL known to be expensive to render and cannot be cached: `https://www.example.com/expensive-db-call`. Additionally, you will add a redirect from the previous URL used to host this page.
1414

15+
:::note
16+
Terraform code snippets below refer to the v4 SDK only.
17+
:::
18+
1519
## 1. Create a new branch and append the page rule
1620

1721
Create a new branch and append the configuration.

src/content/docs/terraform/tutorial/configure-https-settings.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ After proxying a basic website through Cloudflare, you can use Terraform to adju
1212

1313
You will use a new Git branch for the changes and then merge it into the `master` branch before applying. On a team, you might consider using this step as an opportunity for others to review your change before merging and deploying it. You can also integrate Terraform into your CI/CD system to perform tests automatically using another Cloudflare domain.
1414

15+
:::note
16+
Terraform code snippets below refer to the v4 SDK only.
17+
:::
18+
1519
## 1. Create a new branch and append the new zone settings
1620

1721
In this step, modify the Terraform configuration to enable the following settings:

src/content/docs/terraform/tutorial/initialize-terraform.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ This tutorial shows you how to get started with Terraform. The tutorial uses an
1212

1313
Before you begin, ensure you have [installed Terraform](/terraform/installing/). You will also need to [create an API Token](/fundamentals/api/get-started/create-token/) with permissions to edit resources for this tutorial.
1414

15+
:::note
16+
Terraform code snippets below refer to the v4 SDK only.
17+
:::
18+
1519
## 1. Define your first Terraform config file
1620

1721
Create an initial Terraform config file, filling in your own values for the [API token](/fundamentals/api/get-started/create-token/), [zone ID](/fundamentals/setup/find-account-and-zone-ids/), [account ID](/fundamentals/setup/find-account-and-zone-ids/), and [domain](/fundamentals/setup/manage-domains/add-site/).

src/content/docs/terraform/tutorial/revert-configuration.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ Sometimes, you may have to roll back configuration changes. For example, you mig
1212

1313
To revert your configuration, check out the desired branch and ask Terraform to move your Cloudflare settings back in time. If you accidentally brought your site down, consider establishing a good strategy for peer reviewing pull requests rather than merging directly to `master` as done in the tutorials for brevity.
1414

15+
:::note
16+
Terraform code snippets below refer to the v4 SDK only.
17+
:::
18+
1519
## 1. Review your configuration history
1620

1721
Before determining how far back to revert, review the versioned history:

src/content/docs/terraform/tutorial/track-history.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ provider "cloudflare" {
1919

2020
In this tutorial, you will store your configuration in GitHub where it can be tracked, peer-reviewed, and rolled back to as needed. First, you will remove your credentials from the Terraform config file to prevent committing them to a repository.
2121

22+
:::note
23+
Terraform code snippets below refer to the v4 SDK only.
24+
:::
25+
2226
## 1. Use environment variables for authentication
2327

2428
As a good security practice, remove your Cloudflare credentials from anything that will be committed to a repository. The Cloudflare Terraform provider supports reading the credentials (and other configuration) [from environment variables](https://registry.terraform.io/providers/cloudflare/cloudflare/latest/docs#schema), as in the following example:

src/content/docs/terraform/tutorial/use-load-balancing.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ head:
1010

1111
In this tutorial, you will add a second origin for some basic round robining, and then use the [Cloudflare Load Balancing](/load-balancing/) product to fail traffic over as needed. You will also enhance your load balancing configuration through the use of "geo steering" to serve results from an origin server that is geographically closest to your end users.
1212

13+
:::note
14+
Terraform code snippets below refer to the v4 SDK only.
15+
:::
16+
1317
## 1. Add another DNS record for `www`
1418

1519
To get started, add a DNS record for a second web server, located in Asia. The IP address for this server is `198.51.100.15`.

0 commit comments

Comments
 (0)