Skip to content

data.cloudflare_zero_trust_access_infrastructure_targets returns RFC3339 string value is null unless created_before, created_after, modified_before and modified_after are set #6548

@F21

Description

@F21

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

OpenTofu v1.11.1
on linux_amd64

  • provider registry.opentofu.org/cloudflare/cloudflare v5.14.0

Affected resource(s)

data.cloudflare_zero_trust_access_infrastructure_targets

Terraform configuration files

terraform {
  required_providers {
    cloudflare = {
      source  = "cloudflare/cloudflare"
      version = "~> 5.14"
    }
  }

  required_version = "~> 1.11"
}

provider "cloudflare" {
  api_token = "REDACTED"
}

data "cloudflare_zero_trust_access_infrastructure_targets" "test" {
  account_id        = "REDACTED"
  hostname_contains = "test"
}

Link to debug output

https://gist.github.com/F21/93c3c355ad220fae47ff24f1126ca0f4

Panic output

No response

Expected output

Apply should succeed without errors

Actual output

╷
│ Error: RFC3339 ValueRFC3339Time Error
│
│   with data.cloudflare_zero_trust_access_infrastructure_targets.test,
│   on main.tf line 32, in data "cloudflare_zero_trust_access_infrastructure_targets" "test":
│   32: data "cloudflare_zero_trust_access_infrastructure_targets" "test" {
│
│ RFC3339 string value is null

Steps to reproduce

  1. Run tofu apply or terraform apply.

Additional factoids

Work around is to set created_before and modified_before to dates far into the future and created_after and modified_after to dates far in the past.

References

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugCategorizes issue or PR as related to a bug.needs-triageIndicates an issue or PR lacks a `triage/foo` label and requires one.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions