File tree Expand file tree Collapse file tree 1 file changed +3
-13
lines changed Expand file tree Collapse file tree 1 file changed +3
-13
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,6 @@ package provider
33import (
44 "context"
55 "fmt"
6- "net/url"
76 "strings"
87 "time"
98
@@ -106,18 +105,9 @@ func workspacePresetDataSource() *schema.Resource {
106105 Description : "A URL to an icon that will display in the dashboard. View built-in " +
107106 "icons [here](https://github.com/coder/coder/tree/main/site/static/icon). Use a " +
108107 "built-in icon with `\" ${data.coder_workspace.me.access_url}/icon/<path>\" `." ,
109- ForceNew : true ,
110- Optional : true ,
111- ValidateFunc : func (value interface {}, label string ) ([]string , []error ) {
112- val , ok := value .(string )
113- if ! ok {
114- return nil , []error {fmt .Errorf ("expected %q to be a string" , label )}
115- }
116- if _ , err := url .Parse (val ); err != nil {
117- return nil , []error {err }
118- }
119- return nil , nil
120- },
108+ ForceNew : true ,
109+ Optional : true ,
110+ ValidateFunc : helpers .ValidateURL ,
121111 },
122112 "default" : {
123113 Type : schema .TypeBool ,
You can’t perform that action at this time.
0 commit comments