File tree 2 files changed +17
-0
lines changed
2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -406,6 +406,21 @@ func New() *schema.Provider {
406
406
ForceNew : true ,
407
407
Optional : true ,
408
408
},
409
+ "icon" : {
410
+ Type : schema .TypeString ,
411
+ Description : "A URL to an icon that will display in the dashboard. View built-in " +
412
+ "icons here: https://github.com/coder/coder/tree/main/site/static/icon. Use a " +
413
+ "built-in icon with `data.coder_workspace.me.access_url + \" /icons/<path>\" `." ,
414
+ ForceNew : true ,
415
+ Optional : true ,
416
+ ValidateFunc : func (i interface {}, s string ) ([]string , []error ) {
417
+ _ , err := url .Parse (s )
418
+ if err != nil {
419
+ return nil , []error {err }
420
+ }
421
+ return nil , nil
422
+ },
423
+ },
409
424
"item" : {
410
425
Type : schema .TypeList ,
411
426
Description : "Each \" item\" block defines a single metadata item consisting of a key/value pair." ,
Original file line number Diff line number Diff line change @@ -264,6 +264,7 @@ func TestMetadata(t *testing.T) {
264
264
resource "coder_metadata" "agent" {
265
265
resource_id = coder_agent.dev.id
266
266
hide = true
267
+ icon = "/icons/storage.svg"
267
268
item {
268
269
key = "foo"
269
270
value = "bar"
@@ -297,6 +298,7 @@ func TestMetadata(t *testing.T) {
297
298
for key , expected := range map [string ]string {
298
299
"resource_id" : agent .Primary .Attributes ["id" ],
299
300
"hide" : "true" ,
301
+ "icon" : "/icons/storage.svg" ,
300
302
"item.#" : "5" ,
301
303
"item.0.key" : "foo" ,
302
304
"item.0.value" : "bar" ,
You can’t perform that action at this time.
0 commit comments