Skip to content

initd1/cloudflare

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cloudflare

The intent of this repo is to demonstrate how to manage Cloudflare configurations using Terraform and GitHub Actions for CI/CD.

Usage

  • Check providers using terraform providers
  • Initialize Terraform: Run terraform init in your working directory to download necessary plugins.
  • Plan Changes: Use terraform plan --var-file team1.tfvars to see what changes will be made.
  • Apply Configuration: Deploy your setup with terraform apply --var-file team1.tfvars.

Repo structure for modularity with multiple teams being able to 'self-serve'

  ├── .github/
  │   └── workflows/
  │       └── ci-cd.yml
  ├── terraform/
  │   ├── main.tf
  │   ├── variables.tf
  │   ├── outputs.tf
  │   ├── provider.tf
  │   ├── team1.auto.tfvars
  │   └── team2.auto.tfvars
  └── README.md

Commands

Verify Validity of API Token

curl -X GET "https://api.cloudflare.com/client/v4/accounts/<account_id>/tokens/verify" \
     -H "Authorization: Bearer <api_token>" \
     -H "Content-Type:application/json"

Permissions Required for API Token

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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages