Creates and manages Scaleway Site-to-Site VPN Routing Policies. A routing policy defines which routes are accepted from and advertised to the peer gateway via BGP.
For more information, see the main documentation.
Example Usage
Basic
import * as pulumi from "@pulumi/pulumi";
import * as scaleway from "@pulumiverse/scaleway";
const policy = new scaleway.s2svpn.RoutingPolicy("policy", {
name: "my-routing-policy",
prefixFilterIns: ["10.0.2.0/24"],
prefixFilterOuts: ["10.0.1.0/24"],
});
import pulumi
import pulumiverse_scaleway as scaleway
policy = scaleway.s2svpn.RoutingPolicy("policy",
name="my-routing-policy",
prefix_filter_ins=["10.0.2.0/24"],
prefix_filter_outs=["10.0.1.0/24"])
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway/s2svpn"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := s2svpn.NewRoutingPolicy(ctx, "policy", &s2svpn.RoutingPolicyArgs{
Name: pulumi.String("my-routing-policy"),
PrefixFilterIns: pulumi.StringArray{
pulumi.String("10.0.2.0/24"),
},
PrefixFilterOuts: pulumi.StringArray{
pulumi.String("10.0.1.0/24"),
},
})
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 policy = new Scaleway.S2svpn.RoutingPolicy("policy", new()
{
Name = "my-routing-policy",
PrefixFilterIns = new[]
{
"10.0.2.0/24",
},
PrefixFilterOuts = new[]
{
"10.0.1.0/24",
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.scaleway.s2svpn.RoutingPolicy;
import com.pulumi.scaleway.s2svpn.RoutingPolicyArgs;
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 policy = new RoutingPolicy("policy", RoutingPolicyArgs.builder()
.name("my-routing-policy")
.prefixFilterIns("10.0.2.0/24")
.prefixFilterOuts("10.0.1.0/24")
.build());
}
}
resources:
policy:
type: scaleway:s2svpn:RoutingPolicy
properties:
name: my-routing-policy
prefixFilterIns:
- 10.0.2.0/24
prefixFilterOuts:
- 10.0.1.0/24
Multiple Prefixes
import * as pulumi from "@pulumi/pulumi";
import * as scaleway from "@pulumiverse/scaleway";
const policy = new scaleway.s2svpn.RoutingPolicy("policy", {
name: "my-routing-policy",
prefixFilterIns: [
"10.0.2.0/24",
"10.0.3.0/24",
],
prefixFilterOuts: [
"10.0.1.0/24",
"172.16.0.0/16",
],
});
import pulumi
import pulumiverse_scaleway as scaleway
policy = scaleway.s2svpn.RoutingPolicy("policy",
name="my-routing-policy",
prefix_filter_ins=[
"10.0.2.0/24",
"10.0.3.0/24",
],
prefix_filter_outs=[
"10.0.1.0/24",
"172.16.0.0/16",
])
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway/s2svpn"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := s2svpn.NewRoutingPolicy(ctx, "policy", &s2svpn.RoutingPolicyArgs{
Name: pulumi.String("my-routing-policy"),
PrefixFilterIns: pulumi.StringArray{
pulumi.String("10.0.2.0/24"),
pulumi.String("10.0.3.0/24"),
},
PrefixFilterOuts: pulumi.StringArray{
pulumi.String("10.0.1.0/24"),
pulumi.String("172.16.0.0/16"),
},
})
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 policy = new Scaleway.S2svpn.RoutingPolicy("policy", new()
{
Name = "my-routing-policy",
PrefixFilterIns = new[]
{
"10.0.2.0/24",
"10.0.3.0/24",
},
PrefixFilterOuts = new[]
{
"10.0.1.0/24",
"172.16.0.0/16",
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.scaleway.s2svpn.RoutingPolicy;
import com.pulumi.scaleway.s2svpn.RoutingPolicyArgs;
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 policy = new RoutingPolicy("policy", RoutingPolicyArgs.builder()
.name("my-routing-policy")
.prefixFilterIns(
"10.0.2.0/24",
"10.0.3.0/24")
.prefixFilterOuts(
"10.0.1.0/24",
"172.16.0.0/16")
.build());
}
}
resources:
policy:
type: scaleway:s2svpn:RoutingPolicy
properties:
name: my-routing-policy
prefixFilterIns:
- 10.0.2.0/24
- 10.0.3.0/24
prefixFilterOuts:
- 10.0.1.0/24
- 172.16.0.0/16
Create RoutingPolicy Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new RoutingPolicy(name: string, args?: RoutingPolicyArgs, opts?: CustomResourceOptions);@overload
def RoutingPolicy(resource_name: str,
args: Optional[RoutingPolicyArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def RoutingPolicy(resource_name: str,
opts: Optional[ResourceOptions] = None,
is_ipv6: Optional[bool] = None,
name: Optional[str] = None,
prefix_filter_ins: Optional[Sequence[str]] = None,
prefix_filter_outs: Optional[Sequence[str]] = None,
project_id: Optional[str] = None,
region: Optional[str] = None,
tags: Optional[Sequence[str]] = None)func NewRoutingPolicy(ctx *Context, name string, args *RoutingPolicyArgs, opts ...ResourceOption) (*RoutingPolicy, error)public RoutingPolicy(string name, RoutingPolicyArgs? args = null, CustomResourceOptions? opts = null)
public RoutingPolicy(String name, RoutingPolicyArgs args)
public RoutingPolicy(String name, RoutingPolicyArgs args, CustomResourceOptions options)
type: scaleway:s2svpn:RoutingPolicy
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 RoutingPolicyArgs
- 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 RoutingPolicyArgs
- 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 RoutingPolicyArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args RoutingPolicyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args RoutingPolicyArgs
- 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 routingPolicyResource = new Scaleway.S2svpn.RoutingPolicy("routingPolicyResource", new()
{
IsIpv6 = false,
Name = "string",
PrefixFilterIns = new[]
{
"string",
},
PrefixFilterOuts = new[]
{
"string",
},
ProjectId = "string",
Region = "string",
Tags = new[]
{
"string",
},
});
example, err := s2svpn.NewRoutingPolicy(ctx, "routingPolicyResource", &s2svpn.RoutingPolicyArgs{
IsIpv6: pulumi.Bool(false),
Name: pulumi.String("string"),
PrefixFilterIns: pulumi.StringArray{
pulumi.String("string"),
},
PrefixFilterOuts: pulumi.StringArray{
pulumi.String("string"),
},
ProjectId: pulumi.String("string"),
Region: pulumi.String("string"),
Tags: pulumi.StringArray{
pulumi.String("string"),
},
})
var routingPolicyResource = new RoutingPolicy("routingPolicyResource", RoutingPolicyArgs.builder()
.isIpv6(false)
.name("string")
.prefixFilterIns("string")
.prefixFilterOuts("string")
.projectId("string")
.region("string")
.tags("string")
.build());
routing_policy_resource = scaleway.s2svpn.RoutingPolicy("routingPolicyResource",
is_ipv6=False,
name="string",
prefix_filter_ins=["string"],
prefix_filter_outs=["string"],
project_id="string",
region="string",
tags=["string"])
const routingPolicyResource = new scaleway.s2svpn.RoutingPolicy("routingPolicyResource", {
isIpv6: false,
name: "string",
prefixFilterIns: ["string"],
prefixFilterOuts: ["string"],
projectId: "string",
region: "string",
tags: ["string"],
});
type: scaleway:s2svpn:RoutingPolicy
properties:
isIpv6: false
name: string
prefixFilterIns:
- string
prefixFilterOuts:
- string
projectId: string
region: string
tags:
- string
RoutingPolicy 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 RoutingPolicy resource accepts the following input properties:
- Is
Ipv6 bool - Defines whether the routing policy is for IPv6 prefixes. Defaults to
false(IPv4). - Name string
- The name of the routing policy. If not provided, it will be randomly generated.
- Prefix
Filter List<string>Ins - List of IP prefixes (in CIDR notation) to accept from the peer gateway. These are the routes that the customer gateway can announce to Scaleway.
- Prefix
Filter List<string>Outs - List of IP prefixes (in CIDR notation) to advertise to the peer gateway. These are the routes that Scaleway will announce to the customer gateway.
- Project
Id string project_id) The ID of the project the routing policy is associated with.- Region string
region) The region in which the routing policy should be created.- List<string>
- The list of tags to apply to the routing policy.
- Is
Ipv6 bool - Defines whether the routing policy is for IPv6 prefixes. Defaults to
false(IPv4). - Name string
- The name of the routing policy. If not provided, it will be randomly generated.
- Prefix
Filter []stringIns - List of IP prefixes (in CIDR notation) to accept from the peer gateway. These are the routes that the customer gateway can announce to Scaleway.
- Prefix
Filter []stringOuts - List of IP prefixes (in CIDR notation) to advertise to the peer gateway. These are the routes that Scaleway will announce to the customer gateway.
- Project
Id string project_id) The ID of the project the routing policy is associated with.- Region string
region) The region in which the routing policy should be created.- []string
- The list of tags to apply to the routing policy.
- is
Ipv6 Boolean - Defines whether the routing policy is for IPv6 prefixes. Defaults to
false(IPv4). - name String
- The name of the routing policy. If not provided, it will be randomly generated.
- prefix
Filter List<String>Ins - List of IP prefixes (in CIDR notation) to accept from the peer gateway. These are the routes that the customer gateway can announce to Scaleway.
- prefix
Filter List<String>Outs - List of IP prefixes (in CIDR notation) to advertise to the peer gateway. These are the routes that Scaleway will announce to the customer gateway.
- project
Id String project_id) The ID of the project the routing policy is associated with.- region String
region) The region in which the routing policy should be created.- List<String>
- The list of tags to apply to the routing policy.
- is
Ipv6 boolean - Defines whether the routing policy is for IPv6 prefixes. Defaults to
false(IPv4). - name string
- The name of the routing policy. If not provided, it will be randomly generated.
- prefix
Filter string[]Ins - List of IP prefixes (in CIDR notation) to accept from the peer gateway. These are the routes that the customer gateway can announce to Scaleway.
- prefix
Filter string[]Outs - List of IP prefixes (in CIDR notation) to advertise to the peer gateway. These are the routes that Scaleway will announce to the customer gateway.
- project
Id string project_id) The ID of the project the routing policy is associated with.- region string
region) The region in which the routing policy should be created.- string[]
- The list of tags to apply to the routing policy.
- is_
ipv6 bool - Defines whether the routing policy is for IPv6 prefixes. Defaults to
false(IPv4). - name str
- The name of the routing policy. If not provided, it will be randomly generated.
- prefix_
filter_ Sequence[str]ins - List of IP prefixes (in CIDR notation) to accept from the peer gateway. These are the routes that the customer gateway can announce to Scaleway.
- prefix_
filter_ Sequence[str]outs - List of IP prefixes (in CIDR notation) to advertise to the peer gateway. These are the routes that Scaleway will announce to the customer gateway.
- project_
id str project_id) The ID of the project the routing policy is associated with.- region str
region) The region in which the routing policy should be created.- Sequence[str]
- The list of tags to apply to the routing policy.
- is
Ipv6 Boolean - Defines whether the routing policy is for IPv6 prefixes. Defaults to
false(IPv4). - name String
- The name of the routing policy. If not provided, it will be randomly generated.
- prefix
Filter List<String>Ins - List of IP prefixes (in CIDR notation) to accept from the peer gateway. These are the routes that the customer gateway can announce to Scaleway.
- prefix
Filter List<String>Outs - List of IP prefixes (in CIDR notation) to advertise to the peer gateway. These are the routes that Scaleway will announce to the customer gateway.
- project
Id String project_id) The ID of the project the routing policy is associated with.- region String
region) The region in which the routing policy should be created.- List<String>
- The list of tags to apply to the routing policy.
Outputs
All input properties are implicitly available as output properties. Additionally, the RoutingPolicy resource produces the following output properties:
- Created
At string - The date and time of the creation of the routing policy (RFC 3339 format).
- Id string
- The provider-assigned unique ID for this managed resource.
- Organization
Id string - The Organization ID the routing policy is associated with.
- Updated
At string - The date and time of the last update of the routing policy (RFC 3339 format).
- Created
At string - The date and time of the creation of the routing policy (RFC 3339 format).
- Id string
- The provider-assigned unique ID for this managed resource.
- Organization
Id string - The Organization ID the routing policy is associated with.
- Updated
At string - The date and time of the last update of the routing policy (RFC 3339 format).
- created
At String - The date and time of the creation of the routing policy (RFC 3339 format).
- id String
- The provider-assigned unique ID for this managed resource.
- organization
Id String - The Organization ID the routing policy is associated with.
- updated
At String - The date and time of the last update of the routing policy (RFC 3339 format).
- created
At string - The date and time of the creation of the routing policy (RFC 3339 format).
- id string
- The provider-assigned unique ID for this managed resource.
- organization
Id string - The Organization ID the routing policy is associated with.
- updated
At string - The date and time of the last update of the routing policy (RFC 3339 format).
- created_
at str - The date and time of the creation of the routing policy (RFC 3339 format).
- id str
- The provider-assigned unique ID for this managed resource.
- organization_
id str - The Organization ID the routing policy is associated with.
- updated_
at str - The date and time of the last update of the routing policy (RFC 3339 format).
- created
At String - The date and time of the creation of the routing policy (RFC 3339 format).
- id String
- The provider-assigned unique ID for this managed resource.
- organization
Id String - The Organization ID the routing policy is associated with.
- updated
At String - The date and time of the last update of the routing policy (RFC 3339 format).
Look up Existing RoutingPolicy Resource
Get an existing RoutingPolicy 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?: RoutingPolicyState, opts?: CustomResourceOptions): RoutingPolicy@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
created_at: Optional[str] = None,
is_ipv6: Optional[bool] = None,
name: Optional[str] = None,
organization_id: Optional[str] = None,
prefix_filter_ins: Optional[Sequence[str]] = None,
prefix_filter_outs: Optional[Sequence[str]] = None,
project_id: Optional[str] = None,
region: Optional[str] = None,
tags: Optional[Sequence[str]] = None,
updated_at: Optional[str] = None) -> RoutingPolicyfunc GetRoutingPolicy(ctx *Context, name string, id IDInput, state *RoutingPolicyState, opts ...ResourceOption) (*RoutingPolicy, error)public static RoutingPolicy Get(string name, Input<string> id, RoutingPolicyState? state, CustomResourceOptions? opts = null)public static RoutingPolicy get(String name, Output<String> id, RoutingPolicyState state, CustomResourceOptions options)resources: _: type: scaleway:s2svpn:RoutingPolicy 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 routing policy (RFC 3339 format).
- Is
Ipv6 bool - Defines whether the routing policy is for IPv6 prefixes. Defaults to
false(IPv4). - Name string
- The name of the routing policy. If not provided, it will be randomly generated.
- Organization
Id string - The Organization ID the routing policy is associated with.
- Prefix
Filter List<string>Ins - List of IP prefixes (in CIDR notation) to accept from the peer gateway. These are the routes that the customer gateway can announce to Scaleway.
- Prefix
Filter List<string>Outs - List of IP prefixes (in CIDR notation) to advertise to the peer gateway. These are the routes that Scaleway will announce to the customer gateway.
- Project
Id string project_id) The ID of the project the routing policy is associated with.- Region string
region) The region in which the routing policy should be created.- List<string>
- The list of tags to apply to the routing policy.
- Updated
At string - The date and time of the last update of the routing policy (RFC 3339 format).
- Created
At string - The date and time of the creation of the routing policy (RFC 3339 format).
- Is
Ipv6 bool - Defines whether the routing policy is for IPv6 prefixes. Defaults to
false(IPv4). - Name string
- The name of the routing policy. If not provided, it will be randomly generated.
- Organization
Id string - The Organization ID the routing policy is associated with.
- Prefix
Filter []stringIns - List of IP prefixes (in CIDR notation) to accept from the peer gateway. These are the routes that the customer gateway can announce to Scaleway.
- Prefix
Filter []stringOuts - List of IP prefixes (in CIDR notation) to advertise to the peer gateway. These are the routes that Scaleway will announce to the customer gateway.
- Project
Id string project_id) The ID of the project the routing policy is associated with.- Region string
region) The region in which the routing policy should be created.- []string
- The list of tags to apply to the routing policy.
- Updated
At string - The date and time of the last update of the routing policy (RFC 3339 format).
- created
At String - The date and time of the creation of the routing policy (RFC 3339 format).
- is
Ipv6 Boolean - Defines whether the routing policy is for IPv6 prefixes. Defaults to
false(IPv4). - name String
- The name of the routing policy. If not provided, it will be randomly generated.
- organization
Id String - The Organization ID the routing policy is associated with.
- prefix
Filter List<String>Ins - List of IP prefixes (in CIDR notation) to accept from the peer gateway. These are the routes that the customer gateway can announce to Scaleway.
- prefix
Filter List<String>Outs - List of IP prefixes (in CIDR notation) to advertise to the peer gateway. These are the routes that Scaleway will announce to the customer gateway.
- project
Id String project_id) The ID of the project the routing policy is associated with.- region String
region) The region in which the routing policy should be created.- List<String>
- The list of tags to apply to the routing policy.
- updated
At String - The date and time of the last update of the routing policy (RFC 3339 format).
- created
At string - The date and time of the creation of the routing policy (RFC 3339 format).
- is
Ipv6 boolean - Defines whether the routing policy is for IPv6 prefixes. Defaults to
false(IPv4). - name string
- The name of the routing policy. If not provided, it will be randomly generated.
- organization
Id string - The Organization ID the routing policy is associated with.
- prefix
Filter string[]Ins - List of IP prefixes (in CIDR notation) to accept from the peer gateway. These are the routes that the customer gateway can announce to Scaleway.
- prefix
Filter string[]Outs - List of IP prefixes (in CIDR notation) to advertise to the peer gateway. These are the routes that Scaleway will announce to the customer gateway.
- project
Id string project_id) The ID of the project the routing policy is associated with.- region string
region) The region in which the routing policy should be created.- string[]
- The list of tags to apply to the routing policy.
- updated
At string - The date and time of the last update of the routing policy (RFC 3339 format).
- created_
at str - The date and time of the creation of the routing policy (RFC 3339 format).
- is_
ipv6 bool - Defines whether the routing policy is for IPv6 prefixes. Defaults to
false(IPv4). - name str
- The name of the routing policy. If not provided, it will be randomly generated.
- organization_
id str - The Organization ID the routing policy is associated with.
- prefix_
filter_ Sequence[str]ins - List of IP prefixes (in CIDR notation) to accept from the peer gateway. These are the routes that the customer gateway can announce to Scaleway.
- prefix_
filter_ Sequence[str]outs - List of IP prefixes (in CIDR notation) to advertise to the peer gateway. These are the routes that Scaleway will announce to the customer gateway.
- project_
id str project_id) The ID of the project the routing policy is associated with.- region str
region) The region in which the routing policy should be created.- Sequence[str]
- The list of tags to apply to the routing policy.
- updated_
at str - The date and time of the last update of the routing policy (RFC 3339 format).
- created
At String - The date and time of the creation of the routing policy (RFC 3339 format).
- is
Ipv6 Boolean - Defines whether the routing policy is for IPv6 prefixes. Defaults to
false(IPv4). - name String
- The name of the routing policy. If not provided, it will be randomly generated.
- organization
Id String - The Organization ID the routing policy is associated with.
- prefix
Filter List<String>Ins - List of IP prefixes (in CIDR notation) to accept from the peer gateway. These are the routes that the customer gateway can announce to Scaleway.
- prefix
Filter List<String>Outs - List of IP prefixes (in CIDR notation) to advertise to the peer gateway. These are the routes that Scaleway will announce to the customer gateway.
- project
Id String project_id) The ID of the project the routing policy is associated with.- region String
region) The region in which the routing policy should be created.- List<String>
- The list of tags to apply to the routing policy.
- updated
At String - The date and time of the last update of the routing policy (RFC 3339 format).
Import
Routing Policies can be imported using {region}/{id}, e.g.
bash
$ pulumi import scaleway:s2svpn/routingPolicy:RoutingPolicy main fr-par/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.
