Skip to content
This repository was archived by the owner on Mar 1, 2023. It is now read-only.

Commit 3d5c804

Browse files
authored
add rule weight param to docs and examples (#129)
1 parent c65b658 commit 3d5c804

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

docs/resources/gcore_cdn_rule.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ resource "gcore_cdn_rule" "cdn_example_com_rule_1" {
2222
name = "All PNG images"
2323
rule = "/folder/images/*.png"
2424
rule_type = 0
25+
weight = 0
2526
2627
options {
2728
edge_cache_settings {
@@ -59,6 +60,7 @@ resource "gcore_cdn_rule" "cdn_example_com_rule_2" {
5960
name = "All JS scripts"
6061
rule = "/folder/images/*.js"
6162
rule_type = 0
63+
weight = 0
6264
origin_protocol = "HTTP"
6365
6466
options {
@@ -110,6 +112,7 @@ resource "gcore_cdn_resource" "cdn_example_com" {
110112
- `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))
111113
- `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.
112114
- `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, it will be inherit from resource. Possible values are: HTTPS, HTTP, MATCH.
115+
- `weight` (Number) Rule weight that determines rule execution order: from the smallest (0) to the highest.
113116

114117
### Read-Only
115118

examples/resources/gcore_cdn_rule/resource.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ resource "gcore_cdn_rule" "cdn_example_com_rule_1" {
77
name = "All PNG images"
88
rule = "/folder/images/*.png"
99
rule_type = 0
10+
weight = 0
1011

1112
options {
1213
edge_cache_settings {
@@ -44,6 +45,7 @@ resource "gcore_cdn_rule" "cdn_example_com_rule_2" {
4445
name = "All JS scripts"
4546
rule = "/folder/images/*.js"
4647
rule_type = 0
48+
weight = 0
4749
origin_protocol = "HTTP"
4850

4951
options {

gcore/resource_gcore_cdn_rule_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ resource "gcore_cdn_rule" "acctest" {
4343
name = "%s"
4444
rule = "%s"
4545
rule_type = 0
46+
weight = 0
4647
%s
4748
}
4849
`, GCORE_CDN_RESOURCE_ID, params.Name, params.Pattern, params.RawPart)

0 commit comments

Comments
 (0)