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
3
3
import (
4
4
"context"
5
5
"fmt"
6
- "net/url"
7
6
"strings"
8
7
"time"
9
8
@@ -106,18 +105,9 @@ func workspacePresetDataSource() *schema.Resource {
106
105
Description : "A URL to an icon that will display in the dashboard. View built-in " +
107
106
"icons [here](https://github.com/coder/coder/tree/main/site/static/icon). Use a " +
108
107
"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 ,
121
111
},
122
112
"default" : {
123
113
Type : schema .TypeBool ,
You can’t perform that action at this time.
0 commit comments