This tutorial assumes that you have installed Terraform. If you haven’t, please visit the Terraform Downloads page.

Each example builds on the last, so you should start from the top. Here are the topics and resources covered per tutorial step:

Step 1 - Hello World

  • Brief intro
  • Introduction of terraform init, plan, apply, and show.
  • Resources covered: DNS

Step 2 - Tracking your history

  • Storing Cloudflare configuration in source control

Step 3 - HTTPS all the things

Step 4 - Woah, slow down there

  • Adding rate limiting rules
  • Resource covered: rate limit

Step 5 - Sharing the load

Step 6 - Making some exceptions

  • Add page rule
  • Resources covered: page rules

  • WAF off for specific path: /abuse-report

  • Forwarding URL (301) from blog to example.com/blog

Step 7 - On final thought, let’s roll some of that back

  • Reviewing change history
  • Rolling back changes