Creates and manages Scaleway Edge Services Route Stages.
Example Usage
Basic
import * as pulumi from "@pulumi/pulumi";
import * as scaleway from "@pulumiverse/scaleway";
const main = new scaleway.edgeservices.RouteStage("main", {
pipelineId: mainScalewayEdgeServicesPipeline.id,
wafStageId: waf.id,
rules: [{
backendStageId: backend.id,
ruleHttpMatch: {
methodFilters: [
"get",
"post",
],
pathFilter: {
pathFilterType: "regex",
value: ".*",
},
},
}],
});
import pulumi
import pulumiverse_scaleway as scaleway
main = scaleway.edgeservices.RouteStage("main",
pipeline_id=main_scaleway_edge_services_pipeline["id"],
waf_stage_id=waf["id"],
rules=[{
"backend_stage_id": backend["id"],
"rule_http_match": {
"method_filters": [
"get",
"post",
],
"path_filter": {
"path_filter_type": "regex",
"value": ".*",
},
},
}])
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway/edgeservices"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := edgeservices.NewRouteStage(ctx, "main", &edgeservices.RouteStageArgs{
PipelineId: pulumi.Any(mainScalewayEdgeServicesPipeline.Id),
WafStageId: pulumi.Any(waf.Id),
Rules: edgeservices.RouteStageRuleArray{
&edgeservices.RouteStageRuleArgs{
BackendStageId: pulumi.Any(backend.Id),
RuleHttpMatch: &edgeservices.RouteStageRuleRuleHttpMatchArgs{
MethodFilters: pulumi.StringArray{
pulumi.String("get"),
pulumi.String("post"),
},
PathFilter: &edgeservices.RouteStageRuleRuleHttpMatchPathFilterArgs{
PathFilterType: pulumi.String("regex"),
Value: pulumi.String(".*"),
},
},
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Scaleway = Pulumiverse.Scaleway;
return await Deployment.RunAsync(() =>
{
var main = new Scaleway.Edgeservices.RouteStage("main", new()
{
PipelineId = mainScalewayEdgeServicesPipeline.Id,
WafStageId = waf.Id,
Rules = new[]
{
new Scaleway.Edgeservices.Inputs.RouteStageRuleArgs
{
BackendStageId = backend.Id,
RuleHttpMatch = new Scaleway.Edgeservices.Inputs.RouteStageRuleRuleHttpMatchArgs
{
MethodFilters = new[]
{
"get",
"post",
},
PathFilter = new Scaleway.Edgeservices.Inputs.RouteStageRuleRuleHttpMatchPathFilterArgs
{
PathFilterType = "regex",
Value = ".*",
},
},
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.scaleway.edgeservices.RouteStage;
import com.pulumi.scaleway.edgeservices.RouteStageArgs;
import com.pulumi.scaleway.edgeservices.inputs.RouteStageRuleArgs;
import com.pulumi.scaleway.edgeservices.inputs.RouteStageRuleRuleHttpMatchArgs;
import com.pulumi.scaleway.edgeservices.inputs.RouteStageRuleRuleHttpMatchPathFilterArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var main = new RouteStage("main", RouteStageArgs.builder()
.pipelineId(mainScalewayEdgeServicesPipeline.id())
.wafStageId(waf.id())
.rules(RouteStageRuleArgs.builder()
.backendStageId(backend.id())
.ruleHttpMatch(RouteStageRuleRuleHttpMatchArgs.builder()
.methodFilters(
"get",
"post")
.pathFilter(RouteStageRuleRuleHttpMatchPathFilterArgs.builder()
.pathFilterType("regex")
.value(".*")
.build())
.build())
.build())
.build());
}
}
resources:
main:
type: scaleway:edgeservices:RouteStage
properties:
pipelineId: ${mainScalewayEdgeServicesPipeline.id}
wafStageId: ${waf.id}
rules:
- backendStageId: ${backend.id}
ruleHttpMatch:
methodFilters:
- get
- post
pathFilter:
pathFilterType: regex
value: .*
Create RouteStage Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new RouteStage(name: string, args: RouteStageArgs, opts?: CustomResourceOptions);@overload
def RouteStage(resource_name: str,
args: RouteStageArgs,
opts: Optional[ResourceOptions] = None)
@overload
def RouteStage(resource_name: str,
opts: Optional[ResourceOptions] = None,
pipeline_id: Optional[str] = None,
project_id: Optional[str] = None,
rules: Optional[Sequence[RouteStageRuleArgs]] = None,
waf_stage_id: Optional[str] = None)func NewRouteStage(ctx *Context, name string, args RouteStageArgs, opts ...ResourceOption) (*RouteStage, error)public RouteStage(string name, RouteStageArgs args, CustomResourceOptions? opts = null)
public RouteStage(String name, RouteStageArgs args)
public RouteStage(String name, RouteStageArgs args, CustomResourceOptions options)
type: scaleway:edgeservices:RouteStage
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args RouteStageArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args RouteStageArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args RouteStageArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args RouteStageArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args RouteStageArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var routeStageResource = new Scaleway.Edgeservices.RouteStage("routeStageResource", new()
{
PipelineId = "string",
ProjectId = "string",
Rules = new[]
{
new Scaleway.Edgeservices.Inputs.RouteStageRuleArgs
{
BackendStageId = "string",
RuleHttpMatch = new Scaleway.Edgeservices.Inputs.RouteStageRuleRuleHttpMatchArgs
{
MethodFilters = new[]
{
"string",
},
PathFilter = new Scaleway.Edgeservices.Inputs.RouteStageRuleRuleHttpMatchPathFilterArgs
{
PathFilterType = "string",
Value = "string",
},
},
},
},
WafStageId = "string",
});
example, err := edgeservices.NewRouteStage(ctx, "routeStageResource", &edgeservices.RouteStageArgs{
PipelineId: pulumi.String("string"),
ProjectId: pulumi.String("string"),
Rules: edgeservices.RouteStageRuleArray{
&edgeservices.RouteStageRuleArgs{
BackendStageId: pulumi.String("string"),
RuleHttpMatch: &edgeservices.RouteStageRuleRuleHttpMatchArgs{
MethodFilters: pulumi.StringArray{
pulumi.String("string"),
},
PathFilter: &edgeservices.RouteStageRuleRuleHttpMatchPathFilterArgs{
PathFilterType: pulumi.String("string"),
Value: pulumi.String("string"),
},
},
},
},
WafStageId: pulumi.String("string"),
})
var routeStageResource = new RouteStage("routeStageResource", RouteStageArgs.builder()
.pipelineId("string")
.projectId("string")
.rules(RouteStageRuleArgs.builder()
.backendStageId("string")
.ruleHttpMatch(RouteStageRuleRuleHttpMatchArgs.builder()
.methodFilters("string")
.pathFilter(RouteStageRuleRuleHttpMatchPathFilterArgs.builder()
.pathFilterType("string")
.value("string")
.build())
.build())
.build())
.wafStageId("string")
.build());
route_stage_resource = scaleway.edgeservices.RouteStage("routeStageResource",
pipeline_id="string",
project_id="string",
rules=[{
"backend_stage_id": "string",
"rule_http_match": {
"method_filters": ["string"],
"path_filter": {
"path_filter_type": "string",
"value": "string",
},
},
}],
waf_stage_id="string")
const routeStageResource = new scaleway.edgeservices.RouteStage("routeStageResource", {
pipelineId: "string",
projectId: "string",
rules: [{
backendStageId: "string",
ruleHttpMatch: {
methodFilters: ["string"],
pathFilter: {
pathFilterType: "string",
value: "string",
},
},
}],
wafStageId: "string",
});
type: scaleway:edgeservices:RouteStage
properties:
pipelineId: string
projectId: string
rules:
- backendStageId: string
ruleHttpMatch:
methodFilters:
- string
pathFilter:
pathFilterType: string
value: string
wafStageId: string
RouteStage Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The RouteStage resource accepts the following input properties:
- Pipeline
Id string - The ID of the pipeline.
- Project
Id string project_id) The ID of the project the route stage is associated with.- Rules
List<Pulumiverse.
Scaleway. Edgeservices. Inputs. Route Stage Rule> - The list of rules to be checked against every HTTP request. The first matching rule will forward the request to its specified backend stage. If no rules are matched, the request is forwarded to the WAF stage defined by
waf_stage_id. - Waf
Stage stringId - The ID of the WAF stage HTTP requests should be forwarded to when no rules are matched.
- Pipeline
Id string - The ID of the pipeline.
- Project
Id string project_id) The ID of the project the route stage is associated with.- Rules
[]Route
Stage Rule Args - The list of rules to be checked against every HTTP request. The first matching rule will forward the request to its specified backend stage. If no rules are matched, the request is forwarded to the WAF stage defined by
waf_stage_id. - Waf
Stage stringId - The ID of the WAF stage HTTP requests should be forwarded to when no rules are matched.
- pipeline
Id String - The ID of the pipeline.
- project
Id String project_id) The ID of the project the route stage is associated with.- rules
List<Route
Stage Rule> - The list of rules to be checked against every HTTP request. The first matching rule will forward the request to its specified backend stage. If no rules are matched, the request is forwarded to the WAF stage defined by
waf_stage_id. - waf
Stage StringId - The ID of the WAF stage HTTP requests should be forwarded to when no rules are matched.
- pipeline
Id string - The ID of the pipeline.
- project
Id string project_id) The ID of the project the route stage is associated with.- rules
Route
Stage Rule[] - The list of rules to be checked against every HTTP request. The first matching rule will forward the request to its specified backend stage. If no rules are matched, the request is forwarded to the WAF stage defined by
waf_stage_id. - waf
Stage stringId - The ID of the WAF stage HTTP requests should be forwarded to when no rules are matched.
- pipeline_
id str - The ID of the pipeline.
- project_
id str project_id) The ID of the project the route stage is associated with.- rules
Sequence[Route
Stage Rule Args] - The list of rules to be checked against every HTTP request. The first matching rule will forward the request to its specified backend stage. If no rules are matched, the request is forwarded to the WAF stage defined by
waf_stage_id. - waf_
stage_ strid - The ID of the WAF stage HTTP requests should be forwarded to when no rules are matched.
- pipeline
Id String - The ID of the pipeline.
- project
Id String project_id) The ID of the project the route stage is associated with.- rules List<Property Map>
- The list of rules to be checked against every HTTP request. The first matching rule will forward the request to its specified backend stage. If no rules are matched, the request is forwarded to the WAF stage defined by
waf_stage_id. - waf
Stage StringId - The ID of the WAF stage HTTP requests should be forwarded to when no rules are matched.
Outputs
All input properties are implicitly available as output properties. Additionally, the RouteStage resource produces the following output properties:
- created_
at str - The date and time of the creation of the route stage.
- id str
- The provider-assigned unique ID for this managed resource.
- updated_
at str - The date and time of the last update of the route stage.
Look up Existing RouteStage Resource
Get an existing RouteStage resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: RouteStageState, opts?: CustomResourceOptions): RouteStage@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
created_at: Optional[str] = None,
pipeline_id: Optional[str] = None,
project_id: Optional[str] = None,
rules: Optional[Sequence[RouteStageRuleArgs]] = None,
updated_at: Optional[str] = None,
waf_stage_id: Optional[str] = None) -> RouteStagefunc GetRouteStage(ctx *Context, name string, id IDInput, state *RouteStageState, opts ...ResourceOption) (*RouteStage, error)public static RouteStage Get(string name, Input<string> id, RouteStageState? state, CustomResourceOptions? opts = null)public static RouteStage get(String name, Output<String> id, RouteStageState state, CustomResourceOptions options)resources: _: type: scaleway:edgeservices:RouteStage get: id: ${id}- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Created
At string - The date and time of the creation of the route stage.
- Pipeline
Id string - The ID of the pipeline.
- Project
Id string project_id) The ID of the project the route stage is associated with.- Rules
List<Pulumiverse.
Scaleway. Edgeservices. Inputs. Route Stage Rule> - The list of rules to be checked against every HTTP request. The first matching rule will forward the request to its specified backend stage. If no rules are matched, the request is forwarded to the WAF stage defined by
waf_stage_id. - Updated
At string - The date and time of the last update of the route stage.
- Waf
Stage stringId - The ID of the WAF stage HTTP requests should be forwarded to when no rules are matched.
- Created
At string - The date and time of the creation of the route stage.
- Pipeline
Id string - The ID of the pipeline.
- Project
Id string project_id) The ID of the project the route stage is associated with.- Rules
[]Route
Stage Rule Args - The list of rules to be checked against every HTTP request. The first matching rule will forward the request to its specified backend stage. If no rules are matched, the request is forwarded to the WAF stage defined by
waf_stage_id. - Updated
At string - The date and time of the last update of the route stage.
- Waf
Stage stringId - The ID of the WAF stage HTTP requests should be forwarded to when no rules are matched.
- created
At String - The date and time of the creation of the route stage.
- pipeline
Id String - The ID of the pipeline.
- project
Id String project_id) The ID of the project the route stage is associated with.- rules
List<Route
Stage Rule> - The list of rules to be checked against every HTTP request. The first matching rule will forward the request to its specified backend stage. If no rules are matched, the request is forwarded to the WAF stage defined by
waf_stage_id. - updated
At String - The date and time of the last update of the route stage.
- waf
Stage StringId - The ID of the WAF stage HTTP requests should be forwarded to when no rules are matched.
- created
At string - The date and time of the creation of the route stage.
- pipeline
Id string - The ID of the pipeline.
- project
Id string project_id) The ID of the project the route stage is associated with.- rules
Route
Stage Rule[] - The list of rules to be checked against every HTTP request. The first matching rule will forward the request to its specified backend stage. If no rules are matched, the request is forwarded to the WAF stage defined by
waf_stage_id. - updated
At string - The date and time of the last update of the route stage.
- waf
Stage stringId - The ID of the WAF stage HTTP requests should be forwarded to when no rules are matched.
- created_
at str - The date and time of the creation of the route stage.
- pipeline_
id str - The ID of the pipeline.
- project_
id str project_id) The ID of the project the route stage is associated with.- rules
Sequence[Route
Stage Rule Args] - The list of rules to be checked against every HTTP request. The first matching rule will forward the request to its specified backend stage. If no rules are matched, the request is forwarded to the WAF stage defined by
waf_stage_id. - updated_
at str - The date and time of the last update of the route stage.
- waf_
stage_ strid - The ID of the WAF stage HTTP requests should be forwarded to when no rules are matched.
- created
At String - The date and time of the creation of the route stage.
- pipeline
Id String - The ID of the pipeline.
- project
Id String project_id) The ID of the project the route stage is associated with.- rules List<Property Map>
- The list of rules to be checked against every HTTP request. The first matching rule will forward the request to its specified backend stage. If no rules are matched, the request is forwarded to the WAF stage defined by
waf_stage_id. - updated
At String - The date and time of the last update of the route stage.
- waf
Stage StringId - The ID of the WAF stage HTTP requests should be forwarded to when no rules are matched.
Supporting Types
RouteStageRule, RouteStageRuleArgs
- Backend
Stage stringId - The ID of the backend stage that requests matching the rule should be forwarded to.
- Rule
Http Pulumiverse.Match Scaleway. Edgeservices. Inputs. Route Stage Rule Rule Http Match - The rule condition to be matched. Requests matching the condition defined here will be directly forwarded to the backend specified by the
backend_stage_idfield. Requests that do not match will be checked by the next rule's condition.
- Backend
Stage stringId - The ID of the backend stage that requests matching the rule should be forwarded to.
- Rule
Http RouteMatch Stage Rule Rule Http Match - The rule condition to be matched. Requests matching the condition defined here will be directly forwarded to the backend specified by the
backend_stage_idfield. Requests that do not match will be checked by the next rule's condition.
- backend
Stage StringId - The ID of the backend stage that requests matching the rule should be forwarded to.
- rule
Http RouteMatch Stage Rule Rule Http Match - The rule condition to be matched. Requests matching the condition defined here will be directly forwarded to the backend specified by the
backend_stage_idfield. Requests that do not match will be checked by the next rule's condition.
- backend
Stage stringId - The ID of the backend stage that requests matching the rule should be forwarded to.
- rule
Http RouteMatch Stage Rule Rule Http Match - The rule condition to be matched. Requests matching the condition defined here will be directly forwarded to the backend specified by the
backend_stage_idfield. Requests that do not match will be checked by the next rule's condition.
- backend_
stage_ strid - The ID of the backend stage that requests matching the rule should be forwarded to.
- rule_
http_ Routematch Stage Rule Rule Http Match - The rule condition to be matched. Requests matching the condition defined here will be directly forwarded to the backend specified by the
backend_stage_idfield. Requests that do not match will be checked by the next rule's condition.
- backend
Stage StringId - The ID of the backend stage that requests matching the rule should be forwarded to.
- rule
Http Property MapMatch - The rule condition to be matched. Requests matching the condition defined here will be directly forwarded to the backend specified by the
backend_stage_idfield. Requests that do not match will be checked by the next rule's condition.
RouteStageRuleRuleHttpMatch, RouteStageRuleRuleHttpMatchArgs
- Method
Filters List<string> - HTTP methods to filter for. A request using any of these methods will be considered to match the rule. Possible values are
get,post,put,patch,delete,head,options. All methods will match if none is provided. - Path
Filter Pulumiverse.Scaleway. Edgeservices. Inputs. Route Stage Rule Rule Http Match Path Filter - HTTP URL path to filter for. A request whose path matches the given filter will be considered to match the rule. All paths will match if none is provided.
- Method
Filters []string - HTTP methods to filter for. A request using any of these methods will be considered to match the rule. Possible values are
get,post,put,patch,delete,head,options. All methods will match if none is provided. - Path
Filter RouteStage Rule Rule Http Match Path Filter - HTTP URL path to filter for. A request whose path matches the given filter will be considered to match the rule. All paths will match if none is provided.
- method
Filters List<String> - HTTP methods to filter for. A request using any of these methods will be considered to match the rule. Possible values are
get,post,put,patch,delete,head,options. All methods will match if none is provided. - path
Filter RouteStage Rule Rule Http Match Path Filter - HTTP URL path to filter for. A request whose path matches the given filter will be considered to match the rule. All paths will match if none is provided.
- method
Filters string[] - HTTP methods to filter for. A request using any of these methods will be considered to match the rule. Possible values are
get,post,put,patch,delete,head,options. All methods will match if none is provided. - path
Filter RouteStage Rule Rule Http Match Path Filter - HTTP URL path to filter for. A request whose path matches the given filter will be considered to match the rule. All paths will match if none is provided.
- method_
filters Sequence[str] - HTTP methods to filter for. A request using any of these methods will be considered to match the rule. Possible values are
get,post,put,patch,delete,head,options. All methods will match if none is provided. - path_
filter RouteStage Rule Rule Http Match Path Filter - HTTP URL path to filter for. A request whose path matches the given filter will be considered to match the rule. All paths will match if none is provided.
- method
Filters List<String> - HTTP methods to filter for. A request using any of these methods will be considered to match the rule. Possible values are
get,post,put,patch,delete,head,options. All methods will match if none is provided. - path
Filter Property Map - HTTP URL path to filter for. A request whose path matches the given filter will be considered to match the rule. All paths will match if none is provided.
RouteStageRuleRuleHttpMatchPathFilter, RouteStageRuleRuleHttpMatchPathFilterArgs
- Path
Filter stringType - The type of filter to match for the HTTP URL path. For now, all path filters must be written in regex and use the
regextype. - Value string
- The value to be matched for the HTTP URL path.
- Path
Filter stringType - The type of filter to match for the HTTP URL path. For now, all path filters must be written in regex and use the
regextype. - Value string
- The value to be matched for the HTTP URL path.
- path
Filter StringType - The type of filter to match for the HTTP URL path. For now, all path filters must be written in regex and use the
regextype. - value String
- The value to be matched for the HTTP URL path.
- path
Filter stringType - The type of filter to match for the HTTP URL path. For now, all path filters must be written in regex and use the
regextype. - value string
- The value to be matched for the HTTP URL path.
- path_
filter_ strtype - The type of filter to match for the HTTP URL path. For now, all path filters must be written in regex and use the
regextype. - value str
- The value to be matched for the HTTP URL path.
- path
Filter StringType - The type of filter to match for the HTTP URL path. For now, all path filters must be written in regex and use the
regextype. - value String
- The value to be matched for the HTTP URL path.
Import
Route stages can be imported using the {id}, e.g.
bash
$ pulumi import scaleway:edgeservices/routeStage:RouteStage basic 11111111-1111-1111-1111-111111111111
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- scaleway pulumiverse/pulumi-scaleway
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
scalewayTerraform Provider.
