-
Notifications
You must be signed in to change notification settings - Fork 625
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
Unable to create cloudflare_tunnel_config with warp_routing enabled #2920
Comments
Terraform debug log detected ✅ |
Community NoteVoting for Prioritization
Volunteering to Work on This Issue
|
can you include the TF_LOG=DEBUG output on that gist? once that is there, this is ready for triage. |
@jacobbednarz Updated with debug output, thanks! |
I ran into this today and originally thought it was a bug. After working through a solution I realized the default configuration generated by the UI does include a default ingress rule pointing at resource "cloudflare_tunnel_config" "conf" {
account_id = var.cloudflare_account_id
tunnel_id = cloudflare_tunnel.tunnel.id
config {
ingress_rule {
service = "http_status:503"
}
warp_routing {
enabled = true
}
}
} |
@tpickett66 Brilliant, thank you for tracking this down. Looks like this is working for us now, so all CF should have to do is update their provider doc. |
This functionality has been released in v4.34.0 of the Terraform Cloudflare Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you! |
Confirmation
Terraform and Cloudflare provider version
Terraform: 1.5.2
Provider: 4.18.0
Affected resource(s)
cloudflare_tunnel
cloudflare_tunnel_config
Terraform configuration files
Link to debug output
https://gist.github.com/dmitriydvoryanchuk-chime/e6e12336ea0cba8a13122e1d5b5a45a0
Panic output
No response
Expected output
cloudflare_tunnel_config should be created
Actual output
╷
│ Error: Insufficient ingress_rule blocks
│
│ on cfd_tunnels.tf line 41, in resource "cloudflare_tunnel_config" "aws_vpc_it":
│ 41: config {
│
│ At least 1 "ingress_rule" blocks are required.
Steps to reproduce
cloudflare_tunnel
cloudflare_tunnel_config
with configuration specified above.ingress_rule
block being required.ingress_rule
block with the minimumservice
parameter set as blank will crash the provider.ingress_rule
with a dummyservice
parameter (such ashttps://localhost:80
) causeswarp_routing
config to flip tofalse
cloudflare_tunnel_config
at all does not setwarp_routing
totrue
.Additional factoids
We are trying to create a cloudflared tunnel with warp routing enabled. With the way the provider is currently implemented, it is not possible to do so. If the tunnel is created using the UI/dashboard, the API GET output for the tunnel configuration is:
"config": { "warp-routing": { "enabled": true } }, "source": "cloudflare"
which is what is desired.Running an import on a tunnel created using the UI does not import an
ingress_rule
block and will fail to create the resource.Although this is working exactly as implemented, our required configuration is not supported.
References
#2916
https://registry.terraform.io/providers/cloudflare/cloudflare/latest/docs/resources/tunnel_config#nested-schema-for-config
The text was updated successfully, but these errors were encountered: