Here is my rule
resource "cloudflare_page_rule" "https-only" {
zone = "${var.domain}"
target = "http://*${var.domain}/*"
priority = 1
actions = {
always_use_https = true,
}
}
The documentation says the default value of always_use_https
is false. I want to turn this rule on for all http traffic to the zone.
When I apply the rule, I get this error:
* cloudflare_page_rule.https-only: Failed to create page rule: error
from makeRequest: HTTP status 400: content "
{\"success\":false,\"errors\":[{\"code\":1004,\"message\":\"Page Rule
validation failed: See messages for details.\"}],\"messages\":
[{\"code\":1,\"message\":\".settings[0]: Invalid setting
always_use_https\",\"type\":null}],\"result\":null}"
I have tried alternative value such as 'on', but it gets rejected because terraform says the setting only accept boolean value.
How can I set this rule with terraform?