The intent of this repo is to demonstrate how to manage Cloudflare configurations using Terraform and GitHub Actions for CI/CD.
terraform providers
terraform init
in your working directory to download necessary plugins.terraform plan --var-file team1.tfvars
to see what changes will be made.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 |