-
Notifications
You must be signed in to change notification settings - Fork 650
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Page rule creation with redirect fails #5178
Comments
please provide the TF_LOG=DEBUG output for this to be triaged. |
I have similar problems with 5.1.0 in an attempt to upgrade from 4.x.x. As his side note shows the actions part is wrongly documented and/or functioning wrongly:
I have used a similar terraform configuration without the = for "actions" producing the failure seen above. |
using 5.1.0, i'm unable to reproduce this one using a new resource. resource "cloudflare_page_rule" "mydomain_redirect" {
zone_id = var.zone_id
target = "terraform.cfapi.net"
actions = {
forwarding_url = {
url = "https://example.com"
status_code = 302
}
}
status = "active"
} @dhjensen if you're not using the grit migration path, you'll need to manually review the upgrade guide which mentions changing this from a block to an attribute - https://registry.terraform.io/providers/cloudflare/cloudflare/latest/docs/guides/version-5-upgrade#cloudflare_page_rule. depending on the complexity of it, you may also need to manually adjust your state or reimport to get the correct structure. |
Thank you. I will use the grit migration path when 5.2.0 comes out with support for cloudflare_zone account_id migration |
there is no difference in the migration between 5.2 and 5.1. you can follow it today and have it work. |
That was unsuccessful as the zones is going to be replaced(And a buck load of other issues). Using 5.1.0 grit does not modify the zone account_id but I can see some commits for 5.2.0 related to this. 7bb3f3f |
the grit pattern is already available (hence no change with 5.2.0). if you're having other issues with the zone management, please open individual issues. |
Confirmation
Terraform and Cloudflare provider version
Using
v5.1.0
plugin, creating a page rule with a redirect action fails.The resource is defined as:
Applying fails with the following error:
As a side note, documentation shows examples of
actions
as a struct, but it needs to be a variable.Affected resource(s)
Terraform configuration files
Link to debug output
n/a
Panic output
No response
Expected output
n/a
Actual output
n/a
Steps to reproduce
create a resource like the one described
Additional factoids
No response
References
No response
The text was updated successfully, but these errors were encountered: