Closed visitjonathan closed 4 years ago
Hi @visitjonathan you may need to update your code for the recent Go 1.11 changes they made to prepare this provider for the upcoming Terraform 0.12 release
@vishalnayak @martinisoft I wonder if rather than having a flag, perhaps the code should accept an different URL. The Go client already works in this way, where you can provide whatever API endpoint you prefer.
In this way further environments can be used if DNSimple would ever provide more (in fact we have one more for internal use).
The change will also remove the requirement to hardcode the URL in this module. Basically, the change could add a new configurable option to allow to use a different base URL.
Pull request to add a flag enabling the ability to use the DNSimple Sandbox.
The sandbox API is 'api.sandbox.dnsimple.com', while the production DNSimple API is 'api.dnsimple.com'.
Without this change the Terraform DNSimple provider can only connect to the DNSimple production API.
The production API URL is defined in a const (defaultBaseURL) in the https://github.com/dnsimple/dnsimple-go/blob/master/dnsimple/dnsimple.go project, which is imported by this Terraform provider (config.go). At some later stage the 'defaultSandboxURL' const below could be submitted to that dnsimple-go project as a separate PR.