cloudflare-docs
                                
                                 cloudflare-docs copied to clipboard
                                
                                    cloudflare-docs copied to clipboard
                            
                            
                            
                        Terraform: Email attribute conflicts with api_token attribute in example.
Which Cloudflare product does this pertain to?
Terraform
Existing documentation URL(s)
https://developers.cloudflare.com/terraform/tutorial/initialize-terraform/ https://developers.cloudflare.com/terraform/tutorial/track-history/
Section that requires update
https://developers.cloudflare.com/terraform/tutorial/initialize-terraform/#1-define-your-first-terraform-config-file
provider "cloudflare" {
  email = "[email protected]"
  api_token = "your-api-token"
}
What needs to change?
according to provider Cloudflare : https://registry.terraform.io/providers/cloudflare/cloudflare/latest/docs#email
email conflicts with api_token.
terraform plan with the example generates this error :
╷
│ Error: Missing required argument
│ 
│   with provider["registry.terraform.io/cloudflare/cloudflare"],
│   on cloudflare.tf line 12, in provider "cloudflare":
│   12:     email = "[email protected]"
│ 
│ "email": all of `api_key,email` must be specified
How should it change?
remove this line:  email = "[email protected]" from the example.
same error here : https://developers.cloudflare.com/terraform/tutorial/track-history/
Additional information
email is needed with api_key (now considered legacy by Cloudflare) not with api_token.