You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: implement image optimizer in cdn service (#895)
* implement image optimizer in cdn service
* add documentation
* add optimizer in cdn acc test
* add example
---------
Co-authored-by: Matheus Politano <matheus.correia_politano@mail.schwarz>
Co-authored-by: Marcel Jacek <72880145+marceljk@users.noreply.github.com>
Copy file name to clipboardExpand all lines: docs/data-sources/cdn_distribution.md
+9Lines changed: 9 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -46,6 +46,7 @@ data "stackit_cdn_distribution" "example" {
46
46
Read-Only:
47
47
48
48
-`backend` (Attributes) The configured backend for the distribution (see [below for nested schema](#nestedatt--config--backend))
49
+
-`optimizer` (Attributes) Configuration for the Image Optimizer. This is a paid feature that automatically optimizes images to reduce their file size for faster delivery, leading to improved website performance and a better user experience. (see [below for nested schema](#nestedatt--config--optimizer))
49
50
-`regions` (List of String) The configured regions where content will be hosted
50
51
51
52
<aid="nestedatt--config--backend"></a>
@@ -58,6 +59,14 @@ Read-Only:
58
59
-`type` (String) The configured backend type. Supported values are: `http`.
-`backend` (Attributes) The configured backend for the distribution (see [below for nested schema](#nestedatt--config--backend))
55
58
-`regions` (List of String) The configured regions where content will be hosted
56
59
60
+
Optional:
61
+
62
+
-`optimizer` (Attributes) Configuration for the Image Optimizer. This is a paid feature that automatically optimizes images to reduce their file size for faster delivery, leading to improved website performance and a better user experience. (see [below for nested schema](#nestedatt--config--optimizer))
63
+
57
64
<aid="nestedatt--config--backend"></a>
58
65
### Nested Schema for `config.backend`
59
66
@@ -67,6 +74,14 @@ Optional:
67
74
-`origin_request_headers` (Map of String) The configured origin request headers for the backend
@@ -52,6 +54,7 @@ var schemaDescriptions = map[string]string{
52
54
"config_backend": "The configured backend for the distribution",
53
55
"config_regions": "The configured regions where content will be hosted",
54
56
"config_backend_type": "The configured backend type. ",
57
+
"config_optimizer": "Configuration for the Image Optimizer. This is a paid feature that automatically optimizes images to reduce their file size for faster delivery, leading to improved website performance and a better user experience.",
55
58
"config_backend_origin_url": "The configured backend type for the distribution",
56
59
"config_backend_origin_request_headers": "The configured origin request headers for the backend",
57
60
"domain_name": "The name of the domain",
@@ -73,10 +76,13 @@ type Model struct {
73
76
}
74
77
75
78
typedistributionConfigstruct {
76
-
Backendbackend`tfsdk:"backend"`// The backend associated with the distribution
77
-
Regions*[]string`tfsdk:"regions"`// The regions in which data will be cached
79
+
Backendbackend`tfsdk:"backend"`// The backend associated with the distribution
80
+
Regions*[]string`tfsdk:"regions"`// The regions in which data will be cached
81
+
Optimizer types.Object`tfsdk:"optimizer"`// The optimizer configuration
82
+
}
83
+
typeoptimizerConfigstruct {
84
+
Enabled types.Bool`tfsdk:"enabled"`
78
85
}
79
-
80
86
typebackendstruct {
81
87
Typestring`tfsdk:"type"`// The type of the backend. Currently, only "http" backend is supported
82
88
OriginURLstring`tfsdk:"origin_url"`// The origin URL of the backend
0 commit comments