Skip to content

Optional fields cause crash in cloudflare_zero_trust_tunnel_cloudflared(s) when left null #5524

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

Open
3 tasks done
aurimasniekis opened this issue Apr 20, 2025 · 1 comment
Labels
kind/bug Categorizes issue or PR as related to a bug. version/5 Categorizes issue or PR as related to version 5 of the provider.

Comments

@aurimasniekis
Copy link

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.11.4
on darwin_arm64

  • provider registry.terraform.io/cloudflare/cloudflare v5.3.0

Affected resource(s)

data.cloudflare_zero_trust_tunnel_cloudflared
data.cloudflare_zero_trust_tunnel_cloudflareds

(Probably more than these as it's seams it's related to RFC3339 parsing)

Terraform configuration files

data "cloudflare_zero_trust_tunnel_cloudflareds" "this" {
  account_id = ""
}

Link to debug output

Not needed

Panic output

╷
│ Error: RFC3339 ValueRFC3339Time Error
│ 
│   with data.cloudflare_zero_trust_tunnel_cloudflareds.this,
│   on main.tf line 11, in data "cloudflare_zero_trust_tunnel_cloudflareds" "this":
│   11: data "cloudflare_zero_trust_tunnel_cloudflareds" "this" {
│ 
│ RFC3339 string value is null
╵

Expected output

Optional fields should be… well, optional. The resource should return all tunnels when no filters are applied, instead of crashing due to null values.

Actual output

Fails with an RFC3339 parsing error when optional fields are unset. This also means it’s currently impossible to fetch all tunnels without applying time filters. Even when both applied it doesn't work because both filters filter out results...

Steps to reproduce

1.	Use the data source without setting was_active_at or was_inactive_at
2.	Run terraform plan or apply
3.	Observe the crash

Additional factoids

No response

References

No response

@aurimasniekis aurimasniekis added kind/bug Categorizes issue or PR as related to a bug. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Apr 20, 2025
@jhutchings1 jhutchings1 added version/5 Categorizes issue or PR as related to version 5 of the provider. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Apr 21, 2025
@jhutchings1
Copy link
Collaborator

I've opened an internal issue for the feature team to work on this. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. version/5 Categorizes issue or PR as related to version 5 of the provider.
Projects
None yet
Development

No branches or pull requests

2 participants