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

Add support for CLOUDFLARE_API_HOSTNAME #753

Closed
wants to merge 1 commit into from

Conversation

manatarms
Copy link
Contributor

@manatarms manatarms commented Dec 13, 2021

Allows for talking to hostnames other than api.cloudflare.com

@jacobbednarz
Copy link
Member

👋👋👋👋

within the library, we already have this configuration option, unfortunately named BaseURL -

// BaseURL allows you to override the default HTTP base URL used for API calls.

here is an example of it in action within the Terraform provider - https://github.com/cloudflare/terraform-provider-cloudflare/blob/f948788352200cba83d07e107e775b3645d68416/cloudflare/provider.go#L201

both of these are available in released versions too so that should cover everything.

hope this helps!

@jacobbednarz
Copy link
Member

the library example can be seen in the initial PR (#606) too as the options can be a little confusing to use.

@manatarms
Copy link
Contributor Author

I'm mostly doing this so that cf-terraforming uses the same hostname ENV as terraform. I can probably do this in cf-terraforming itself.
I'll add it to my current PR cloudflare/cf-terraforming#331

@manatarms manatarms closed this Dec 13, 2021
@jacobbednarz
Copy link
Member

that’s probably the best way. the other two places (Go library and Terraform) have support for this so cf-terraforming just needs it.

@manatarms manatarms deleted the support-api-host-env branch December 13, 2021 21:02
@manatarms
Copy link
Contributor Author

Updated cloudflare/cf-terraforming@70f5f1f

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.

2 participants