Skip to content

Conversation

@musa-cf
Copy link
Contributor

@musa-cf musa-cf commented Feb 25, 2025

This is best reviewed commit-by-commit.

Changes include:

  • Adding placeholder test data for the v5-specific tests
  • Fix an issue with handling single resource responses with v5 resource generation
  • Add a new global Cloudflare Go SDK client
  • Add index to static resource IDs if there are multiple resources being generated to prevent Terraform validation failures
  • Add a new parameterized test for v5
    • The test cases will get enabled 1-by-1 as we verify that they work as expected.

placeholderReplacer := strings.NewReplacer("{account_id}", accountID, "{zone_id}", zoneID)
endpoint = placeholderReplacer.Replace(endpoint)

client := cloudflare.NewClient()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need to rename it here? we can also just alias cloudflare-go to something else instead of reassigning here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've opted to remove the reassignment so that the new Go client is api and old one is apiv0, I can change that if you'd like though

Copy link
Contributor

@jacobbednarz jacobbednarz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

couple of minor nitpicks but generally, 👍

@vaishakdinesh vaishakdinesh self-requested a review February 27, 2025 20:11
@vaishakdinesh
Copy link
Member

lgtm too!

@jacobbednarz jacobbednarz merged commit 3c5ba65 into cloudflare:master Feb 27, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants