Skip to content

Zone settings can't be generated #803

Open
@michal-bajer1

Description

@michal-bajer1

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

v0.23.3

Expected outcome

I was expecting to be able to run:

.\cf-terraforming\cf-terraforming.exe generate --zone $Env:CLOUDFLARE_ZONE_ID --resource-type "cloudflare_zone_setting" --verbose > generated_resources.tf

And receive a list of cloudflare_zone_setting resources for the referenced zone.

Actual outcome

time="2025-02-26T15:56:52+01:00" level=debug msg="initializing cloudflare-go with API Token" account_Id= zone_id=<redacted>
time="2025-02-26T15:56:55+01:00" level=debug msg="initializing Terraform in ."
time="2025-02-26T15:56:56+01:00" level=debug msg="detected provider" version=5.1.0
time="2025-02-26T15:56:56+01:00" level=debug msg="reading Terraform schema for Cloudflare provider"
time="2025-02-26T15:57:01+01:00" level=debug msg="reading and building resource" resource=cloudflare_zone_setting
time="2025-02-26T15:57:02+01:00" level=fatal msg="failed to fetch API endpoint: GET \"https://api.cloudflare.com/client/v4/zones/<redacted>/settings/%7Bsetting_id%7D\": 400 Bad Request {\"success\":false,\"errors\":[{\"code\":7003,\"message\":\"Could not route to \\/zones\\/e5e1a71288b7d3add58e757ca0e48eae\\/settings\\/{setting_id}, perhaps your object identifier is invalid?\"},{\"code\":7000,\"message\":\"No route for that URI\"}],\"messages\":[],\"result\":null}"
PS D:\Repositories\mews-infrastructure-cloudflare> 

It seems the tool doesn't list the setting_id values and then can't call relevant GET operations. There also doesn't seem to be any way to pass the value as another parameter.

Steps to reproduce

  1. Use provider v5.1.0
  2. Try to generate resources cloudflare_zone_setting for any zone

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