Skip to content

Commit a336507

Browse files
authored
feat: Rename "CODER_URL" to "CODER_AGENT_URL" (#15)
Users can optionally set "CODER_URL" if they want to force the CLI to use a specific endpoint, but this should remain optional. Forcing this to be set disallows users from using a different Coder deployment inside of their workspace.
1 parent 91e136e commit a336507

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

internal/provider/provider.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ func New() *schema.Provider {
2626
Type: schema.TypeString,
2727
Description: "The URL to access Coder.",
2828
Optional: true,
29-
// The "CODER_URL" environment variable is used by default
29+
// The "CODER_AGENT_URL" environment variable is used by default
3030
// as the Access URL when generating scripts.
31-
DefaultFunc: schema.EnvDefaultFunc("CODER_URL", "https://mydeployment.coder.com"),
31+
DefaultFunc: schema.EnvDefaultFunc("CODER_AGENT_URL", "https://mydeployment.coder.com"),
3232
ValidateFunc: func(i interface{}, s string) ([]string, []error) {
3333
_, err := url.Parse(s)
3434
if err != nil {
@@ -44,7 +44,7 @@ func New() *schema.Provider {
4444
return nil, diag.Errorf("unexpected type %q for url", reflect.TypeOf(resourceData.Get("url")).String())
4545
}
4646
if rawURL == "" {
47-
return nil, diag.Errorf("CODER_URL must not be empty; got %q", rawURL)
47+
return nil, diag.Errorf("CODER_AGENT_URL must not be empty; got %q", rawURL)
4848
}
4949
parsed, err := url.Parse(resourceData.Get("url").(string))
5050
if err != nil {

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy