cloudflare-pages-terraform
This is a terraform module that allows easy declarative setup of CloudFlare Pages project with a custom domain.
module "example" {
source = " github.com/AleksaC/cloudflare-pages-terraform?ref=v0.2.2"
name = " example"
domain_name = " example.com"
}
API token permissions needed to deploy resources in this module:
Account Settings:Read (not required if you provided account id as a variable)
Cloudflare Pages:Edit
Zone:Edit, Zone Settings:Edit, DNS:Edit
No modules.
Name
Description
Type
Default
Required
account_id
CloudFlare account id. If not provided this module will try to extract it from cloudflare_accounts data source if it returns only one value, otherwise an error will be thrown
string
""
no
domain_name
Custom domain
string
n/a
yes
name
Name of the project
string
n/a
yes
override_zone_settings
Whether to make some opinionated changes to CloudFlare zone settings or keep the defaults
bool
true
no
production_branch
The name of the branch that is used for the production environment
string
"main"
no
Name
Description
name_servers
Cloudflare-assigned name servers. You need to update your nameservers at your registrar to point to these nameservers to complete the setup.
zone_id
n/a