This repository was archived by the owner on Mar 1, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +36
-1
lines changed Expand file tree Collapse file tree 3 files changed +36
-1
lines changed Original file line number Diff line number Diff line change @@ -333,6 +333,25 @@ var (
333
333
},
334
334
},
335
335
},
336
+ "websockets" : {
337
+ Type : schema .TypeList ,
338
+ MaxItems : 1 ,
339
+ Optional : true ,
340
+ Description : "" ,
341
+ Elem : & schema.Resource {
342
+ Schema : map [string ]* schema.Schema {
343
+ "enabled" : {
344
+ Type : schema .TypeBool ,
345
+ Optional : true ,
346
+ Default : true ,
347
+ },
348
+ "value" : {
349
+ Type : schema .TypeBool ,
350
+ Required : true ,
351
+ },
352
+ },
353
+ },
354
+ },
336
355
},
337
356
},
338
357
}
@@ -704,6 +723,16 @@ func listToOptions(l []interface{}) *gcdn.Options {
704
723
opts .StaticHeaders .Value [k ] = v .(string )
705
724
}
706
725
}
726
+ if opt , ok := getOptByName (fields , "websockets" ); ok {
727
+ enabled := true
728
+ if _ , ok := opt ["enabled" ]; ok {
729
+ enabled = opt ["enabled" ].(bool )
730
+ }
731
+ opts .WebSockets = & gcdn.WebSockets {
732
+ Enabled : enabled ,
733
+ Value : opt ["value" ].(bool ),
734
+ }
735
+ }
707
736
return & opts
708
737
}
709
738
@@ -787,6 +816,10 @@ func optionsToList(options *gcdn.Options) []interface{} {
787
816
m := structToMap (options .StaticHeaders )
788
817
result ["static_headers" ] = []interface {}{m }
789
818
}
819
+ if options .WebSockets != nil {
820
+ m := structToMap (options .WebSockets )
821
+ result ["websockets" ] = []interface {}{m }
822
+ }
790
823
return []interface {}{result }
791
824
}
792
825
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ require (
6
6
github.com/AlekSi/pointer v1.2.0
7
7
github.com/G-Core/g-dns-sdk-go v0.1.2
8
8
github.com/G-Core/gcore-storage-sdk-go v0.1.2
9
- github.com/G-Core/gcorelabscdn-go v0.1.18
9
+ github.com/G-Core/gcorelabscdn-go v0.1.19
10
10
github.com/G-Core/gcorelabscloud-go v0.4.43
11
11
github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320
12
12
github.com/hashicorp/terraform-plugin-sdk/v2 v2.10.1
Original file line number Diff line number Diff line change @@ -49,6 +49,8 @@ github.com/G-Core/gcore-storage-sdk-go v0.1.2 h1:bCKATw47kwYZLXDCgiQ4IS5ecwSv9HQ
49
49
github.com/G-Core/gcore-storage-sdk-go v0.1.2 /go.mod h1:e/5w5R2Uh6T7g6oAc5SpTKZJInFG6FyYYvGpUgRwCQ4 =
50
50
github.com/G-Core/gcorelabscdn-go v0.1.18 h1:ISDvMA0EFw6PJnQKTnJ5lAJ5mm1MVRbjMZoZkClA42I =
51
51
github.com/G-Core/gcorelabscdn-go v0.1.18 /go.mod h1:iSGXaTvZBzDHQW+rKFS918BgFVpONcyLEijwh8WsXpE =
52
+ github.com/G-Core/gcorelabscdn-go v0.1.19 h1:Vu7BRcRmSALqSpvwxZvwQnRpQ3B/cK94dNLppYMgq80 =
53
+ github.com/G-Core/gcorelabscdn-go v0.1.19 /go.mod h1:iSGXaTvZBzDHQW+rKFS918BgFVpONcyLEijwh8WsXpE =
52
54
github.com/G-Core/gcorelabscloud-go v0.4.43 h1:e4D1iJSoPKye3YyOXS7vER2ZYitu51cpAK68n1c3sGM =
53
55
github.com/G-Core/gcorelabscloud-go v0.4.43 /go.mod h1:Z1MF80mWagEUrxygtYkvW/MJEYNmIUPsIEYBB3cKjOM =
54
56
github.com/Masterminds/goutils v1.1.0 h1:zukEsf/1JZwCMgHiK3GZftabmxiCw4apj3a28RPBiVg =
You can’t perform that action at this time.
0 commit comments