-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make spaceId required on the provider; make lvs space specific
- Loading branch information
Showing
5 changed files
with
26 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
package octopusdeploy | ||
|
||
import ( | ||
"net/http" | ||
"net/url" | ||
|
||
"github.com/OctopusDeploy/go-octopusdeploy/v2/pkg/client" | ||
Check failure on line 7 in octopusdeploy/config.go GitHub Actions / build
|
||
|
@@ -21,7 +22,19 @@ func (c *Config) Client() (*client.Client, diag.Diagnostics) { | |
return nil, diag.FromErr(err) | ||
} | ||
|
||
octopus, err := client.NewClient(nil, apiURL, c.APIKey, "") | ||
// This is intentional on the feature branch - Todo: remove when merging to main branch | ||
proxyStr := "http://127.0.0.1:8866" | ||
proxyURL, err := url.Parse(proxyStr) | ||
if err != nil { | ||
return nil, nil | ||
} | ||
|
||
tr := &http.Transport{ | ||
Proxy: http.ProxyURL(proxyURL), | ||
} | ||
httpClient := http.Client{Transport: tr} | ||
|
||
octopus, err := client.NewClient(&httpClient, apiURL, c.APIKey, "") | ||
if err != nil { | ||
return nil, diag.FromErr(err) | ||
} | ||
|
@@ -32,7 +45,7 @@ func (c *Config) Client() (*client.Client, diag.Diagnostics) { | |
return nil, diag.FromErr(err) | ||
} | ||
|
||
octopus, err = client.NewClient(nil, apiURL, c.APIKey, space.GetID()) | ||
octopus, err = client.NewClient(&httpClient, apiURL, c.APIKey, space.GetID()) | ||
if err != nil { | ||
return nil, diag.FromErr(err) | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters