Skip to content
Merged
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
6 changes: 3 additions & 3 deletions internal/provider/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ func New() *schema.Provider {
Type: schema.TypeString,
Description: "The URL to access Coder.",
Optional: true,
// The "CODER_URL" environment variable is used by default
// The "CODER_AGENT_URL" environment variable is used by default
// as the Access URL when generating scripts.
DefaultFunc: schema.EnvDefaultFunc("CODER_URL", "https://mydeployment.coder.com"),
DefaultFunc: schema.EnvDefaultFunc("CODER_AGENT_URL", "https://mydeployment.coder.com"),
ValidateFunc: func(i interface{}, s string) ([]string, []error) {
_, err := url.Parse(s)
if err != nil {
Expand All @@ -44,7 +44,7 @@ func New() *schema.Provider {
return nil, diag.Errorf("unexpected type %q for url", reflect.TypeOf(resourceData.Get("url")).String())
}
if rawURL == "" {
return nil, diag.Errorf("CODER_URL must not be empty; got %q", rawURL)
return nil, diag.Errorf("CODER_AGENT_URL must not be empty; got %q", rawURL)
}
parsed, err := url.Parse(resourceData.Get("url").(string))
if err != nil {
Expand Down