This is a basic template to get started with Cloudflare after onboarding an Enterprise zone. State file is stored in terraform Cloud and integrated with Github actions.
Template will update :
-
Zone level setting
-
DNS
-
WAF Managed rules
-
Custom rules
-
Rate limiting
-
Transform rules
-
Redirect rules
-
Cache rules
-
Zero Trust
-
Cloudflare Access
Reference :
Steps:
-
clone the repo
-
run > "Terraform init"
-
run > "Terraform plan"
-
run > "Terraform apply"
-
Note: Terraform plan and apply command will prompt for API token and zone ID
Reference