The intent of this repo is to demonstrate how to manage Cloudflare configurations using Terraform and GitHub Actions for CI/CD.
- Check providers using
terraform providers - Initialize Terraform: Run
terraform initin your working directory to download necessary plugins. - Plan Changes: Use
terraform plan --var-file team1.tfvarsto see what changes will be made. - Apply Configuration: Deploy your setup with
terraform apply --var-file team1.tfvars.
├── .github/
│ └── workflows/
│ └── ci-cd.yml
├── terraform/
│ ├── main.tf
│ ├── variables.tf
│ ├── outputs.tf
│ ├── provider.tf
│ ├── team1.auto.tfvars
│ └── team2.auto.tfvars
└── README.md
curl -X GET "https://api.cloudflare.com/client/v4/accounts/<account_id>/tokens/verify" \
-H "Authorization: Bearer <api_token>" \
-H "Content-Type:application/json"
| Type | Permission | Mode |
|---|---|---|
| Account | Cloudflare Tunnel | Edit |
| Account | Zero Trust | Edit |
| Account | DNS Firewall | Edit |
| Account | Access: Apps and Policies | Edit |
| Account | Account Firewall Access Rules | Edit |
| Account | Access: Apps and Policies | Edit |
| Account | Account Firewall Access Rules | Read |
| Account | Access: Apps and Policies | Read |
| Zone | DNS | Edit |