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

Commit

Permalink
add rule weight param to docs and examples (#129)
Browse files Browse the repository at this point in the history
  • Loading branch information
freenoth authored Nov 23, 2022
1 parent c65b658 commit 3d5c804
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions docs/resources/gcore_cdn_rule.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ resource "gcore_cdn_rule" "cdn_example_com_rule_1" {
name = "All PNG images"
rule = "/folder/images/*.png"
rule_type = 0
weight = 0
options {
edge_cache_settings {
Expand Down Expand Up @@ -59,6 +60,7 @@ resource "gcore_cdn_rule" "cdn_example_com_rule_2" {
name = "All JS scripts"
rule = "/folder/images/*.js"
rule_type = 0
weight = 0
origin_protocol = "HTTP"
options {
Expand Down Expand Up @@ -110,6 +112,7 @@ resource "gcore_cdn_resource" "cdn_example_com" {
- `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))
- `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.
- `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.
- `weight` (Number) Rule weight that determines rule execution order: from the smallest (0) to the highest.

### Read-Only

Expand Down
2 changes: 2 additions & 0 deletions examples/resources/gcore_cdn_rule/resource.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ resource "gcore_cdn_rule" "cdn_example_com_rule_1" {
name = "All PNG images"
rule = "/folder/images/*.png"
rule_type = 0
weight = 0

options {
edge_cache_settings {
Expand Down Expand Up @@ -44,6 +45,7 @@ resource "gcore_cdn_rule" "cdn_example_com_rule_2" {
name = "All JS scripts"
rule = "/folder/images/*.js"
rule_type = 0
weight = 0
origin_protocol = "HTTP"

options {
Expand Down
1 change: 1 addition & 0 deletions gcore/resource_gcore_cdn_rule_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ resource "gcore_cdn_rule" "acctest" {
name = "%s"
rule = "%s"
rule_type = 0
weight = 0
%s
}
`, GCORE_CDN_RESOURCE_ID, params.Name, params.Pattern, params.RawPart)
Expand Down

0 comments on commit 3d5c804

Please sign in to comment.