» cloudflare_custom_pages
Provides a resource which manages Cloudflare custom error pages.
» Example Usage
resource "cloudflare_custom_pages" "basic_challenge" {
zone_id = "d41d8cd98f00b204e9800998ecf8427e"
type = "basic_challenge"
url = "https://example.com/challenge.html"
state = "customized"
}
» Argument Reference
The following arguments are supported:
-
zone_id
- (Optional) The zone ID where the custom pages should be updated. Eitherzone_id
oraccount_id
must be provided. -
account_id
- (Optional) The account ID where the custom pages should be updated. Eitheraccount_id
orzone_id
must be provided. Ifaccount_id
is present, it will override the zone setting. -
type
- (Required) The type of custom page you wish to update. Must be one ofbasic_challenge
,waf_challenge
,waf_block
,ratelimit_block
,country_challenge
,ip_block
,under_attack
,500_errors
,1000_errors
,always_online
. -
url
- (Required) URL of where the custom page source is located. -
state
- (Required) Managed state of the custom page. Must be one ofdefault
,customised
. If the value isdefault
it will be removed from the Terraform state management.
» Import
Custom pages can be imported using a composite ID formed of:
-
customPageLevel
- Eitheraccount
orzone
. -
identifier
- The ID of the account or zone you intend to manage. -
pageType
- The value from thetype
argument.
Example for a zone:
$ terraform import cloudflare_custom_pages.basic_challenge zone/d41d8cd98f00b204e9800998ecf8427e/basic_challenge
Example for an account:
$ terraform import cloudflare_custom_pages.basic_challenge account/e268443e43d93dab7ebef303bbe9642f/basic_challenge