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
{{ message }}
This repository was archived by the owner on Mar 1, 2023. It is now read-only.
-**active** (Boolean) The setting allows to enable or disable a CDN Resource
42
42
-**id** (String) The ID of this resource.
43
+
-**options** (Block List, Max: 1) Each option in CDN resource settings. Each option added to CDN resource settings should have the following mandatory request fields: enabled, value. (see [below for nested schema](#nestedblock--options))
43
44
-**origin** (String) A domain name or IP of your origin source. Specify a port if custom. You can use either 'origin' parameter or 'originGroup' in the resource definition.
44
45
-**origin_group** (Number) ID of the Origins Group. Use one of your Origins Group or create a new one. You can use either 'origin' parameter or 'originGroup' in the resource definition.
45
46
-**origin_protocol** (String) This option defines the protocol that will be used by CDN servers to request content from an origin source. If not specified, we will use HTTP to connect to an origin server. Possible values are: HTTPS, HTTP, MATCH.
46
47
-**secondary_hostnames** (Set of String) List of additional CNAMEs.
48
+
-**ssl_data** (Number)
49
+
-**ssl_enabled** (Boolean)
47
50
48
51
### Read-Only
49
52
50
53
-**last_updated** (String)
51
54
-**status** (String) Status of a CDN resource content availability. Possible values are: Active, Suspended, Processed.
52
55
56
+
<aid="nestedblock--options"></a>
57
+
### Nested Schema for `options`
58
+
59
+
Optional:
60
+
61
+
-**edge_cache_settings** (Block List, Max: 1) The cache expiration time for CDN servers. (see [below for nested schema](#nestedblock--options--edge_cache_settings))
62
+
-**host_header** (Block List, Max: 1) Specify the Host header that CDN servers use when request content from an origin server. Your server must be able to process requests with the chosen header. If the option is in NULL state Host Header value is taken from the CNAME field. (see [below for nested schema](#nestedblock--options--host_header))
### Nested Schema for `options.edge_cache_settings`
66
+
67
+
Required:
68
+
69
+
-**enabled** (Boolean)
70
+
71
+
Optional:
72
+
73
+
-**custom_values** (Map of String) Caching time for a response with specific codes. These settings have a higher priority than the value field. Response code ('304', '404' for example). Use 'any' to specify caching time for all response codes. Caching time in seconds ('0s', '600s' for example). Use '0s' to disable caching for a specific response code.
74
+
-**default** (String) Content will be cached according to origin cache settings. The value applies for a response with codes 200, 201, 204, 206, 301, 302, 303, 304, 307, 308 if an origin server does not have caching HTTP headers. Responses with other codes will not be cached.
75
+
-**value** (String) Caching time for a response with codes 200, 206, 301, 302. Responses with codes 4xx, 5xx will not be cached. Use '0s' disable to caching. Use custom_values field to specify a custom caching time for a response with specific codes.
-**options** (Block List, Max: 1) Each option in CDN resource settings. Each option added to CDN resource settings should have the following mandatory request fields: enabled, value. (see [below for nested schema](#nestedblock--options))
73
+
74
+
<aid="nestedblock--options"></a>
75
+
### Nested Schema for `options`
76
+
77
+
Optional:
78
+
79
+
-**edge_cache_settings** (Block List, Max: 1) The cache expiration time for CDN servers. (see [below for nested schema](#nestedblock--options--edge_cache_settings))
80
+
-**host_header** (Block List, Max: 1) Specify the Host header that CDN servers use when request content from an origin server. Your server must be able to process requests with the chosen header. If the option is in NULL state Host Header value is taken from the CNAME field. (see [below for nested schema](#nestedblock--options--host_header))
### Nested Schema for `options.edge_cache_settings`
84
+
85
+
Required:
86
+
87
+
-**enabled** (Boolean)
88
+
89
+
Optional:
90
+
91
+
-**custom_values** (Map of String) Caching time for a response with specific codes. These settings have a higher priority than the value field. Response code ('304', '404' for example). Use 'any' to specify caching time for all response codes. Caching time in seconds ('0s', '600s' for example). Use '0s' to disable caching for a specific response code.
92
+
-**default** (String) Content will be cached according to origin cache settings. The value applies for a response with codes 200, 201, 204, 206, 301, 302, 303, 304, 307, 308 if an origin server does not have caching HTTP headers. Responses with other codes will not be cached.
93
+
-**value** (String) Caching time for a response with codes 200, 206, 301, 302. Responses with codes 4xx, 5xx will not be cached. Use '0s' disable to caching. Use custom_values field to specify a custom caching time for a response with specific codes.
Description: "Each option in CDN resource settings. Each option added to CDN resource settings should have the following mandatory request fields: enabled, value.",
71
+
Elem: &schema.Resource{
72
+
Schema: map[string]*schema.Schema{
73
+
"edge_cache_settings": {
74
+
Type: schema.TypeList,
75
+
MaxItems: 1,
76
+
Optional: true,
77
+
Computed: true,
78
+
Description: "The cache expiration time for CDN servers.",
79
+
Elem: &schema.Resource{
80
+
Schema: map[string]*schema.Schema{
81
+
"enabled": {
82
+
Type: schema.TypeBool,
83
+
Required: true,
84
+
},
85
+
"value": {
86
+
Type: schema.TypeString,
87
+
Optional: true,
88
+
Description: "Caching time for a response with codes 200, 206, 301, 302. Responses with codes 4xx, 5xx will not be cached. Use '0s' disable to caching. Use custom_values field to specify a custom caching time for a response with specific codes.",
89
+
},
90
+
"default": {
91
+
Type: schema.TypeString,
92
+
Optional: true,
93
+
Description: "Content will be cached according to origin cache settings. The value applies for a response with codes 200, 201, 204, 206, 301, 302, 303, 304, 307, 308 if an origin server does not have caching HTTP headers. Responses with other codes will not be cached.",
94
+
},
95
+
"custom_values": {
96
+
Type: schema.TypeMap,
97
+
Optional: true,
98
+
Elem: schema.TypeString,
99
+
Description: "Caching time for a response with specific codes. These settings have a higher priority than the value field. Response code ('304', '404' for example). Use 'any' to specify caching time for all response codes. Caching time in seconds ('0s', '600s' for example). Use '0s' to disable caching for a specific response code.",
100
+
},
101
+
},
102
+
},
103
+
},
104
+
"host_header": {
105
+
Type: schema.TypeList,
106
+
MaxItems: 1,
107
+
Optional: true,
108
+
Description: "Specify the Host header that CDN servers use when request content from an origin server. Your server must be able to process requests with the chosen header. If the option is in NULL state Host Header value is taken from the CNAME field.",
109
+
Elem: &schema.Resource{
110
+
Schema: map[string]*schema.Schema{
111
+
"enabled": {
112
+
Type: schema.TypeBool,
113
+
Required: true,
114
+
},
115
+
"value": {
116
+
Type: schema.TypeString,
117
+
Required: true,
118
+
},
119
+
},
120
+
},
121
+
},
122
+
},
123
+
},
124
+
},
54
125
"active": {
55
126
Type: schema.TypeBool,
56
127
Optional: true,
@@ -121,8 +192,13 @@ func resourceCDNResourceRead(ctx context.Context, d *schema.ResourceData, m inte
0 commit comments