Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Complete removal of the global api.AccountID #1154

Closed
favonia opened this issue Dec 22, 2022 · 2 comments · Fixed by #1315
Closed

Complete removal of the global api.AccountID #1154

favonia opened this issue Dec 22, 2022 · 2 comments · Fixed by #1315
Milestone

Comments

@favonia
Copy link
Contributor

favonia commented Dec 22, 2022

Current cloudflare-go version

0.57

Description

Currently, only DNS firewall, Railgun, and ZoneIDByName can depend on the global api.AccountID (possibly via api.userBaseURL). I wonder if it is in the plan to completely stop using the global api.AccountID even outside the Terraform-related API. The current interface is slightly confusing because it is unclear when api.AccountID is used. If it is indeed planned to remove api.AccountID, I hope the field and the setter will soon be deprecated and then removed.

Use cases

A clear indication that api.AccountID will not be used (if that is the plan).

Potential cloudflare-go usage

// This does not address other endpoints related to Railgun
type RailgunListOptions struct {
	AccountID string
	Direction string
}

// This does not address other endpoints related to DNS Firewall
type DNSFirewallUserAnalyticsOptions struct {
	AccountID string
	Metrics   []string
	Since     *time.Time
	Until     *time.Time
}

References

No response

@jacobbednarz
Copy link
Member

Yes, once 4.x of the Terraform provider is cut (cloudflare/terraform-provider-cloudflare#1646) a couple of these methods will also go with it.

@github-actions
Copy link
Contributor

This functionality has been released in v0.70.0.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants