Skip to content

FATA[0002] failed to unmarshal result: #783

Open
@dvmyronov

Description

@dvmyronov

Confirmation

  • My issue isn't already found on the issue tracker.
  • I have replicated my issue using the latest version of the library and it is still present.

cf-terraforming version

cf-terraforming v0.22.0

Expected outcome

I tried to get tf for cloudflare_custom_hostname_fallback_origin

Actual outcome

cf-terraforming generate --resource-type cloudflare_custom_hostname_fallback_origin -z xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -v
DEBU[0000] initializing cloudflare-go with API Token account_Id= zone_id=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
DEBU[0000] initializing Terraform in .
DEBU[0000] detected provider version: 5.0.0-rc1
DEBU[0000] reading Terraform schema for Cloudflare provider
DEBU[0001] beginning to read and build "cloudflare_custom_hostname_fallback_origin" resources
FATA[0002] failed to unmarshal result: json: cannot unmarshal object into Go value of type []interface {

The curl returns the next json:
{
"success": true,
"errors": [],
"messages": [],
"result": {
"origin": "xxx.xxxxxxxxx.xxx",
"status": "active",
"created_at": "2024-10-31T19:44:22.48734Z",
"updated_at": "2024-10-31T19:44:23.050729Z"
}
}

Steps to reproduce

export CLOUDFLARE_TERRAFORM_BINARY_PATH='/usr/bin/terraform'
export CLOUDFLARE_API_TOKEN='--------smth--------------'
cf-terraforming generate --resource-type cloudflare_custom_hostname_fallback_origin -z xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -v

I've got the same error for many another objects. If it's interesting, I could provide more detailed statistics.

References

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions