Terraform module -
This module helps you set up a Cloudflare team for use with the Warp client, enabling Malware protection and Adblocking.
You need to register for an account first and then install the Cloudflare Warp client on the devices you want to protect.
https://developers.cloudflare.com/cloudflare-one/setup/
This module does everything else, sets up the block lists and has 2 GHA that keep the list updated and deploy it.
It's 100% Open Source and licensed under the APACHE2.
module "adblock" {
source = "JamesWoolfenden/adblock/cloudflare"
version = "0.0.1"
team_name = "<yourteamnamefromcloudflare>"
}
To run a copy of the Github action (Deploy and Bump), you need to add the env vars to your repository secrets:
CLOUDFLARE_API_KEY
CLOUDFLARE_EMAIL
I'm also using an AWS state file, if you use the same then you'll also need to provide adequate AWS creds and env vars.
Adapted from https://blog.marcolancini.it/2022/blog-serverless-ad-blocking-with-cloudflare-gateway/.
Name | Version |
---|---|
cloudflare | 3.33.1 |
Name | Version |
---|---|
cloudflare | 3.33.1 |
No modules.
Name | Type |
---|---|
cloudflare_teams_account.woolfenden | resource |
cloudflare_teams_list.pihole_domain_lists | resource |
cloudflare_teams_rule.block_ads | resource |
cloudflare_teams_rule.block_malware | resource |
cloudflare_accounts.woolfenden | data source |
Name | Description | Type | Default | Required |
---|---|---|---|---|
logo_path | n/a | string |
"https://pbs.twimg.com/profile_images/1408927094315393028/WkL6f1Qf_400x400.jpg" |
no |
team_name | Your cloudflare team name | string |
n/a | yes |
Name | Description |
---|---|
account | n/a |
accounts | n/a |
malware_rule | n/a |
team | n/a |
This is the policy required to build this project:
and Using https://github.com/marco-lancini/utils/tree/main/terraform/cloudflare-gateway-adblocking
The action-update-list.yml
provides a sample
GitHub Actions workflow that periodically (monthly) fetches the list upstream and commits it to the repo if it has changed.
Check out these related projects.
- terraform-aws-s3 - S3 buckets
Got a question?
File a GitHub issue.
Please use the issue tracker to report any bugs or file feature requests.
Copyright � 2023 James Woolfenden
See LICENSE for full details.
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.