parent
460c18c202
commit
53a3697850
124 changed files with 8342 additions and 6042 deletions
|
|
@ -21,9 +21,8 @@ func ConfigureClient(ctx context.Context, providerData *core.ProviderData, diags
|
|||
}
|
||||
if providerData.IaaSCustomEndpoint != "" {
|
||||
apiClientConfigOptions = append(apiClientConfigOptions, config.WithEndpoint(providerData.IaaSCustomEndpoint))
|
||||
} else {
|
||||
apiClientConfigOptions = append(apiClientConfigOptions, config.WithRegion(providerData.GetRegion()))
|
||||
}
|
||||
|
||||
apiClient, err := iaas.NewAPIClient(apiClientConfigOptions...)
|
||||
if err != nil {
|
||||
core.LogAndAddError(ctx, diags, "Error configuring API client", fmt.Sprintf("Configuring client: %v. This is an error related to the provider configuration, not to the resource configuration", err))
|
||||
|
|
|
|||
|
|
@ -49,7 +49,6 @@ func TestConfigureClient(t *testing.T) {
|
|||
},
|
||||
expected: func() *iaas.APIClient {
|
||||
apiClient, err := iaas.NewAPIClient(
|
||||
config.WithRegion("eu01"),
|
||||
utils.UserAgentConfigOption(testVersion),
|
||||
)
|
||||
if err != nil {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue