Difference between revisions of "Terraform Cloudflare provider"
Jump to navigation
Jump to search
(Created page with "https://registry.terraform.io/providers/cloudflare/cloudflare/latest/doc * {{tf providers}} * {{Cloudflare}}") |
|||
(18 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | https://registry.terraform.io/providers/cloudflare/cloudflare/latest/ | + | https://registry.terraform.io/providers/cloudflare/cloudflare/latest/docs |
+ | Resources: | ||
+ | * <code>[[cloudflare_record]]: [[proxied]]</code> | ||
+ | * <code>[[cloudflare_page_rule]]</code> | ||
+ | * <code>[[cloudflare_account]]</code> | ||
+ | * <code>[[cloudflare_load_balancer]]</code> | ||
+ | Data sources: | ||
+ | * <code>[[cloudflare_ip_ranges]]</code> | ||
+ | * <code>[[cloudflare_zones]]</code> | ||
+ | == Official Example == | ||
+ | # 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" { | ||
+ | # ... | ||
+ | } | ||
− | * {{tf | + | == See also == |
+ | * {{tf init}} | ||
+ | * {{tf CF}} | ||
* {{Cloudflare}} | * {{Cloudflare}} | ||
+ | |||
+ | [[Category:Cloudflare]] |
Latest revision as of 19:18, 16 July 2024
https://registry.terraform.io/providers/cloudflare/cloudflare/latest/docs
Resources:
Data sources:
Official Example[edit]
# 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[edit]
terraform init
[-upgrade | -reconfigure | -backend-config | -get-plugins=false | -verify-plugins=false ]
,--help
, Execution examples, Execution with errors,~/.terraformrc, required_providers
- Terraform Cloudflare:
cloudflare_record, cloudflare_page_rule, cloudflare_ip_ranges
- 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: