Skip to content

Commit

Permalink
Add support for CLOUDFLARE_API_HOSTNAME
Browse files Browse the repository at this point in the history
  • Loading branch information
manatarms committed Dec 14, 2021
1 parent d87352d commit 70f5f1f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions internal/app/cf-terraforming/cmd/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,11 @@ func sharedPreRun(cmd *cobra.Command, args []string) {
options = append(options, cloudflare.UsingAccount(accountID))
}

var apiHost string
if apiHost = os.Getenv("CLOUDFLARE_API_HOSTNAME"); apiHost != "" {
options = append(options, cloudflare.BaseURL("https://"+apiHost+"/client/v4"))
}

var err error

// Don't initialise a client in CI as this messes with VCR and the ability to
Expand Down

0 comments on commit 70f5f1f

Please sign in to comment.