Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CDP-1428 extend fastedge option #188

Merged
merged 1 commit into from
Feb 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/resources/cdn_resource.md
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,8 @@ Required:
Optional:

- `enabled` (Boolean) Determines if the FastEdge application should be called whenever HTTP request headers are received.
- `execute_on_edge` (Boolean) Determines if the request should be executed at the edge nodes.
- `execute_on_shield` (Boolean) Determines if the request should be executed at the shield nodes.
- `interrupt_on_error` (Boolean) Determines if the request execution should be interrupted when an error occurs.


Expand Down
2 changes: 2 additions & 0 deletions docs/resources/cdn_rule.md
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,8 @@ Required:
Optional:

- `enabled` (Boolean) Determines if the FastEdge application should be called whenever HTTP request headers are received.
- `execute_on_edge` (Boolean) Determines if the request should be executed at the edge nodes.
- `execute_on_shield` (Boolean) Determines if the request should be executed at the shield nodes.
- `interrupt_on_error` (Boolean) Determines if the request execution should be interrupted when an error occurs.


Expand Down
2 changes: 2 additions & 0 deletions docs/resources/cdn_rule_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,8 @@ Required:
Optional:

- `enabled` (Boolean) Determines if the FastEdge application should be called whenever HTTP request headers are received.
- `execute_on_edge` (Boolean) Determines if the request should be executed at the edge nodes.
- `execute_on_shield` (Boolean) Determines if the request should be executed at the shield nodes.
- `interrupt_on_error` (Boolean) Determines if the request execution should be interrupted when an error occurs.


Expand Down
12 changes: 12 additions & 0 deletions gcore/resource_gcore_cdn_options.go
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,18 @@ var (
Default: true,
Description: "Determines if the request execution should be interrupted when an error occurs.",
},
"execute_on_edge": {
Type: schema.TypeBool,
Optional: true,
Default: true,
Description: "Determines if the request should be executed at the edge nodes.",
},
"execute_on_shield": {
Type: schema.TypeBool,
Optional: true,
Default: false,
Description: "Determines if the request should be executed at the shield nodes.",
},
},
},
},
Expand Down
2 changes: 2 additions & 0 deletions gcore/resource_gcore_cdn_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,8 @@ func listToOptions(l []interface{}) *gcdn.Options {
Enabled: onRequestHeaders["enabled"].(bool),
AppID: onRequestHeaders["app_id"].(string),
InterruptOnError: onRequestHeaders["interrupt_on_error"].(bool),
ExecuteOnEdge: onRequestHeaders["execute_on_edge"].(bool),
ExecuteOnShield: onRequestHeaders["execute_on_shield"].(bool),
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ require (
github.com/AlekSi/pointer v1.2.0
github.com/G-Core/gcore-dns-sdk-go v0.2.9
github.com/G-Core/gcore-storage-sdk-go v0.1.34
github.com/G-Core/gcorelabscdn-go v1.0.27
github.com/G-Core/gcorelabscdn-go v1.0.28
github.com/G-Core/gcorelabscloud-go v0.11.0
github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320
github.com/hashicorp/terraform-plugin-sdk/v2 v2.27.0
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ github.com/G-Core/gcore-storage-sdk-go v0.1.34 h1:0GPQfz1kA6mQi6fiisGsh0Um4H9PZe
github.com/G-Core/gcore-storage-sdk-go v0.1.34/go.mod h1:BUAEZZZJJt/+luRFunqziv3+JnbVMLbQXDWz9kV8Te8=
github.com/G-Core/gcorelabscdn-go v1.0.27 h1:XglfvHLYmb1NJxATig6bdPyN9DKdGt5vUlIc+kbpu6s=
github.com/G-Core/gcorelabscdn-go v1.0.27/go.mod h1:iSGXaTvZBzDHQW+rKFS918BgFVpONcyLEijwh8WsXpE=
github.com/G-Core/gcorelabscdn-go v1.0.28 h1:6ymVMV3HPTICO5BWJCEcZZzgY+Pc/+/TQMzeXMN77GQ=
github.com/G-Core/gcorelabscdn-go v1.0.28/go.mod h1:iSGXaTvZBzDHQW+rKFS918BgFVpONcyLEijwh8WsXpE=
github.com/G-Core/gcorelabscloud-go v0.11.0 h1:JzlEp0Cgm3i4lQFJKhscDK76uWYH2pQNzZOwKtvrMUQ=
github.com/G-Core/gcorelabscloud-go v0.11.0/go.mod h1:13Z1USxlxPbDFuYQyWqfNexlk4kUvOYTXbnvV/Z1lZo=
github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow=
Expand Down