Difference between revisions of "Terraform Cloudflare provider"
Jump to navigation
Jump to search
Line 1: | Line 1: | ||
https://registry.terraform.io/providers/cloudflare/cloudflare/latest/docs | https://registry.terraform.io/providers/cloudflare/cloudflare/latest/docs | ||
+ | == Examples == | ||
+ | Official: | ||
+ | <pre> | ||
+ | # Configure the Cloudflare provider using the required_providers stanza | ||
+ | # required with Terraform 0.13 and beyond. You may optionally use version | ||
+ | # directive to prevent breaking changes occurring unannounced. | ||
+ | terraform { | ||
+ | required_providers { | ||
+ | cloudflare = { | ||
+ | source = "cloudflare/cloudflare" | ||
+ | version = "~> 4.0" | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | |||
+ | provider "cloudflare" { | ||
+ | api_token = var.cloudflare_api_token | ||
+ | } | ||
+ | |||
+ | # Create a record | ||
+ | resource "cloudflare_record" "www" { | ||
+ | # ... | ||
+ | } | ||
+ | |||
+ | # Create a page rule | ||
+ | resource "cloudflare_page_rule" "www" { | ||
+ | # ... | ||
+ | } | ||
+ | </pre> | ||
Revision as of 19:59, 6 February 2024
https://registry.terraform.io/providers/cloudflare/cloudflare/latest/docs
Examples
Official:
# Configure the Cloudflare provider using the required_providers stanza # required with Terraform 0.13 and beyond. You may optionally use version # directive to prevent breaking changes occurring unannounced. terraform { required_providers { cloudflare = { source = "cloudflare/cloudflare" version = "~> 4.0" } } } provider "cloudflare" { api_token = var.cloudflare_api_token } # Create a record resource "cloudflare_record" "www" { # ... } # Create a page rule resource "cloudflare_page_rule" "www" { # ... }
See also
- Terraform provider:
AWS, Cloudflare
,GoogleWorkspace
,Kubernetes, Helm, .terraform/providers/
,template
,tfe
,providers.tf, dns, hashicorp/, hashicorp/tls
, Terraform provider versioning, Libvirt, datadog,terraform providers, required_version, onepassword
,rancher2
,time, terraform.tf
- Cloudflare, Cloudflare Workers, Cloudflare Radar, Zaraz, Cloudflare WARP, Cloudflare Access, cloudflared, IPFS Gateway, DNSLink, Cloudflare R2, Cloudflare Pages, Cloudflare WAF, Advanced Certificate Manager, Cloudflare, cache analytics, Cloudflare Tunnel, Spectrum, Web3, Cloudflare Argo Smart Routing, Under Attack Mode, Cloudflare Bot fight mode, Cloudflare API Shield, Magic Transit, purge cache
Advertising: