-
Notifications
You must be signed in to change notification settings - Fork 782
Open
Labels
kind/bugCategorizes issue or PR as related to a bug.Categorizes issue or PR as related to a bug.
Description
Confirmation
- This is a bug with an existing resource and is not a feature request or enhancement. Feature requests should be submitted with Cloudflare Support or your account team.
- I have searched the issue tracker and my issue isn't already found.
- I have replicated my issue using the latest version of the provider and it is still present.
Terraform and Cloudflare provider version
Terraform v1.14.3
on darwin_arm64
- provider registry.terraform.io/cloudflare/cloudflare v5.15.0
Affected resource(s)
- cloudflare_calls_turn_app
Terraform configuration files
terraform {
required_version = "1.14.3"
required_providers {
cloudflare = {
source = "cloudflare/cloudflare"
version = "~> 5"
}
}
}
provider "cloudflare" {
api_key = var.cloudflare_api_key
email = var.cloudflare_account_email
}
resource "cloudflare_calls_turn_app" "turn_server" {
account_id = var.cloudflare_account_id
name = "terraform-test"
}Link to debug output
https://gist.github.com/jiji606/fe064e910f5784694132574170ba8832
Panic output
No response
Expected output
I was expecting the plan not to fail.
Actual output
After creating the TURN app any plan will fail.
╷
│ Error: failed to make http request
│
│ with cloudflare_calls_turn_app.turn_server,
│ on turn.tf line 16, in resource "cloudflare_calls_turn_app" "turn_server":
│ 16: resource "cloudflare_calls_turn_app" "turn_server" {
│
│ missing required key_id parameter
╵
Steps to reproduce
- Prepare terraform configuration as provided.
- Apply the configuration - this should run fine and create the server. It should be visible in the UI.
- Run a plan, with or without any changes - this will fail.
Additional factoids
I initially found this bug on terraform version 1.12.2 but it's also reproducible on the newest version. The same error happens if I'm running this on gitlab CI (running on linux).
The key_id that the log complains about is probably the uid that is generated in the resource. I can see that the uid is properly populated in the state but key and key_id stay empty.
{
"account_id" = "redacted"
"created" = "2026-01-05T15:22:15Z"
"key" = (sensitive value) <- this is also tostring(null)
"key_id" = tostring(null)
"modified" = "2026-01-05T15:22:15Z"
"name" = "terraform-test"
"uid" = "redacted"
}
References
No response
Metadata
Metadata
Assignees
Labels
kind/bugCategorizes issue or PR as related to a bug.Categorizes issue or PR as related to a bug.