Skip to content

cloudflare_cloud_connector_rules: Provider returned invalid result object after apply #5418

@raidlman

Description

@raidlman

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

When trying to create a Cloud Connector Rule via Terraform I get the following wall of errors.

Affected resource(s)

cloudflare_cloud_connector_rules

Terraform configuration files

resource "cloudflare_cloud_connector_rules" "connector" {
  zone_id = cloudflare_zone.my_zone.id

  rules = [{
    description    = "connect aws bucket"
    enabled        = true
    expression     = "(http.request.uri.path wildcard \"/static/*\")"
    cloud_provider = "aws_s3"
    parameters = {
      host = "<bucket>.s3.eu-central-1.amazonaws.com"
    }
  }]
}

Link to debug output

https://gist.github.com/raidlman/eeb6531df99d8da3d48a14c5c6399d99

Panic output

No response

Expected output

Successful apply

Actual output

│ Error: Provider returned invalid result object after apply
│ 
│ After the apply operation, the provider still indicated an unknown value for cloudflare_cloud_connector_rules.connector.cloud_provider. All values must be
│ known after apply, so this is always a bug in the provider and should be reported in the provider's own repository. OpenTofu will still save the other known object values in the
│ state.
╵
╷
│ Error: Provider returned invalid result object after apply
│ 
│ After the apply operation, the provider still indicated an unknown value for cloudflare_cloud_connector_rules.connector.description. All values must be
│ known after apply, so this is always a bug in the provider and should be reported in the provider's own repository. OpenTofu will still save the other known object values in the
│ state.
╵
╷
│ Error: Provider returned invalid result object after apply
│ 
│ After the apply operation, the provider still indicated an unknown value for cloudflare_cloud_connector_rules.connector.enabled. All values must be known
│ after apply, so this is always a bug in the provider and should be reported in the provider's own repository. OpenTofu will still save the other known object values in the state.
╵
╷
│ Error: Provider returned invalid result object after apply
│ 
│ After the apply operation, the provider still indicated an unknown value for cloudflare_cloud_connector_rules.connector.expression. All values must be known
│ after apply, so this is always a bug in the provider and should be reported in the provider's own repository. OpenTofu will still save the other known object values in the state.
╵
╷
│ Error: Provider returned invalid result object after apply
│ 
│ After the apply operation, the provider still indicated an unknown value for cloudflare_cloud_connector_rules.connector.id. All values must be known after
│ apply, so this is always a bug in the provider and should be reported in the provider's own repository. OpenTofu will still save the other known object values in the state.
╵
╷
│ Error: Provider returned invalid result object after apply
│ 
│ After the apply operation, the provider still indicated an unknown value for cloudflare_cloud_connector_rules.connector.parameters. All values must be known
│ after apply, so this is always a bug in the provider and should be reported in the provider's own repository. OpenTofu will still save the other known object values in the state.

Steps to reproduce

  1. create cloud connector via provider version 5.2

Additional factoids

Checking via the API tells me that the connector was created successfully.

{
  "success": true,
  "result": [
    {
      "expression": "(http.request.uri.path wildcard \"/static/*\")",
      "description": "connect aws bucket",
      "id": "0415279a6e2f437cbe905503475a37da",
      "enabled": true,
      "parameters": {
        "host": "<bucket>.s3.eu-central-1.amazonaws.com"
      },
      "provider": "aws_s3"
    }
  ]
}

On subsequent runs, terraform wants to replace the created resource:

  # cloudflare_cloud_connector_rules.connector is tainted, so it must be replaced
-/+ resource "cloudflare_cloud_connector_rules" "connector" {
      + cloud_provider = (known after apply)
      + description    = (known after apply)
      + enabled        = (known after apply)
      + expression     = (known after apply)
      + id             = (known after apply)
      + parameters     = (known after apply)

References

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    version/5Categorizes issue or PR as related to version 5 of the provider.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions