Skip to content
This repository has been archived by the owner on Oct 19, 2023. It is now read-only.

update base url of vpc endpoint #26

Merged
merged 1 commit into from
May 13, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion huaweicloudstack/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ func (c *Config) imageV2Client(region string) (*golangsdk.ServiceClient, error)

func (c *Config) networkingV2Client(region string) (*golangsdk.ServiceClient, error) {
if sc := c.getCustomerEndpoint("vpc"); sc != nil {
sc.ResourceBase = sc.ResourceBase + "v2.0/"
sc.ResourceBase = sc.Endpoint + "v2.0/"
return sc, nil
}

Expand Down
2 changes: 2 additions & 0 deletions huaweicloudstack/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,8 @@ func configureProviderEndpoints(d *schema.ResourceData) map[string]string {
if !strings.HasSuffix(endpoint, "/") {
endpoint = fmt.Sprintf("%s/", endpoint)
}

log.Printf("[DEBUG] set endpoint of service %s: %s", key, endpoint)
epMap[key] = endpoint
}
return epMap
Expand Down