This repository was archived by the owner on Mar 1, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -144,6 +144,24 @@ func resourceCDNResource() *schema.Resource {
144
144
},
145
145
},
146
146
},
147
+ "gzip_on" : {
148
+ Type : schema .TypeList ,
149
+ MaxItems : 1 ,
150
+ Optional : true ,
151
+ Description : "" ,
152
+ Elem : & schema.Resource {
153
+ Schema : map [string ]* schema.Schema {
154
+ "enabled" : {
155
+ Type : schema .TypeBool ,
156
+ Required : true ,
157
+ },
158
+ "value" : {
159
+ Type : schema .TypeBool ,
160
+ Required : true ,
161
+ },
162
+ },
163
+ },
164
+ },
147
165
},
148
166
},
149
167
},
@@ -315,6 +333,12 @@ func listToOptions(l []interface{}) *gcdn.Options {
315
333
Value : opt ["value" ].(bool ),
316
334
}
317
335
}
336
+ if opt , ok := getOptByName (fields , "gzip_on" ); ok {
337
+ opts .GzipOn = & gcdn.GzipOn {
338
+ Enabled : opt ["enabled" ].(bool ),
339
+ Value : opt ["value" ].(bool ),
340
+ }
341
+ }
318
342
return & opts
319
343
}
320
344
@@ -354,6 +378,10 @@ func optionsToList(options *gcdn.Options) []interface{} {
354
378
m := structToMap (options .RedirectHttpToHttps )
355
379
result ["redirect_http_to_https" ] = []interface {}{m }
356
380
}
381
+ if options .GzipOn != nil {
382
+ m := structToMap (options .GzipOn )
383
+ result ["gzip_on" ] = []interface {}{m }
384
+ }
357
385
return []interface {}{result }
358
386
}
359
387
You can’t perform that action at this time.
0 commit comments