Scaleway v1.25.0 published on Saturday, Mar 22, 2025 by pulumiverse
scaleway.loadbalancers.getRoute
Explore with Pulumi AI
Get information about Scaleway Load Balancer routes.
For more information, see the main documentation or API documentation.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as scaleway from "@pulumi/scaleway";
import * as scaleway from "@pulumiverse/scaleway";
const ip01 = new scaleway.loadbalancers.Ip("ip01", {});
const lb01 = new scaleway.loadbalancers.LoadBalancer("lb01", {
ipId: ip01.id,
name: "test-lb",
type: "lb-s",
});
const bkd01 = new scaleway.loadbalancers.Backend("bkd01", {
lbId: lb01.id,
forwardProtocol: "tcp",
forwardPort: 80,
proxyProtocol: "none",
});
const frt01 = new scaleway.loadbalancers.Frontend("frt01", {
lbId: lb01.id,
backendId: bkd01.id,
inboundPort: 80,
});
const rt01 = new scaleway.loadbalancers.Route("rt01", {
frontendId: frt01.id,
backendId: bkd01.id,
matchSni: "sni.scaleway.com",
});
const byID = scaleway.loadbalancers.getRouteOutput({
routeId: rt01.id,
});
import pulumi
import pulumi_scaleway as scaleway
import pulumiverse_scaleway as scaleway
ip01 = scaleway.loadbalancers.Ip("ip01")
lb01 = scaleway.loadbalancers.LoadBalancer("lb01",
ip_id=ip01.id,
name="test-lb",
type="lb-s")
bkd01 = scaleway.loadbalancers.Backend("bkd01",
lb_id=lb01.id,
forward_protocol="tcp",
forward_port=80,
proxy_protocol="none")
frt01 = scaleway.loadbalancers.Frontend("frt01",
lb_id=lb01.id,
backend_id=bkd01.id,
inbound_port=80)
rt01 = scaleway.loadbalancers.Route("rt01",
frontend_id=frt01.id,
backend_id=bkd01.id,
match_sni="sni.scaleway.com")
by_id = scaleway.loadbalancers.get_route_output(route_id=rt01.id)
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway/loadbalancers"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
ip01, err := loadbalancers.NewIp(ctx, "ip01", nil)
if err != nil {
return err
}
lb01, err := loadbalancers.NewLoadBalancer(ctx, "lb01", &loadbalancers.LoadBalancerArgs{
IpId: ip01.ID(),
Name: pulumi.String("test-lb"),
Type: pulumi.String("lb-s"),
})
if err != nil {
return err
}
bkd01, err := loadbalancers.NewBackend(ctx, "bkd01", &loadbalancers.BackendArgs{
LbId: lb01.ID(),
ForwardProtocol: pulumi.String("tcp"),
ForwardPort: pulumi.Int(80),
ProxyProtocol: pulumi.String("none"),
})
if err != nil {
return err
}
frt01, err := loadbalancers.NewFrontend(ctx, "frt01", &loadbalancers.FrontendArgs{
LbId: lb01.ID(),
BackendId: bkd01.ID(),
InboundPort: pulumi.Int(80),
})
if err != nil {
return err
}
rt01, err := loadbalancers.NewRoute(ctx, "rt01", &loadbalancers.RouteArgs{
FrontendId: frt01.ID(),
BackendId: bkd01.ID(),
MatchSni: pulumi.String("sni.scaleway.com"),
})
if err != nil {
return err
}
_ = loadbalancers.LookupRouteOutput(ctx, loadbalancers.GetRouteOutputArgs{
RouteId: rt01.ID(),
}, nil)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Scaleway = Pulumi.Scaleway;
using Scaleway = Pulumiverse.Scaleway;
return await Deployment.RunAsync(() =>
{
var ip01 = new Scaleway.Loadbalancers.Ip("ip01");
var lb01 = new Scaleway.Loadbalancers.LoadBalancer("lb01", new()
{
IpId = ip01.Id,
Name = "test-lb",
Type = "lb-s",
});
var bkd01 = new Scaleway.Loadbalancers.Backend("bkd01", new()
{
LbId = lb01.Id,
ForwardProtocol = "tcp",
ForwardPort = 80,
ProxyProtocol = "none",
});
var frt01 = new Scaleway.Loadbalancers.Frontend("frt01", new()
{
LbId = lb01.Id,
BackendId = bkd01.Id,
InboundPort = 80,
});
var rt01 = new Scaleway.Loadbalancers.Route("rt01", new()
{
FrontendId = frt01.Id,
BackendId = bkd01.Id,
MatchSni = "sni.scaleway.com",
});
var byID = Scaleway.Loadbalancers.GetRoute.Invoke(new()
{
RouteId = rt01.Id,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.scaleway.loadbalancers.Ip;
import com.pulumi.scaleway.loadbalancers.LoadBalancer;
import com.pulumi.scaleway.loadbalancers.LoadBalancerArgs;
import com.pulumi.scaleway.loadbalancers.Backend;
import com.pulumi.scaleway.loadbalancers.BackendArgs;
import com.pulumi.scaleway.loadbalancers.Frontend;
import com.pulumi.scaleway.loadbalancers.FrontendArgs;
import com.pulumi.scaleway.loadbalancers.Route;
import com.pulumi.scaleway.loadbalancers.RouteArgs;
import com.pulumi.scaleway.loadbalancers.LoadbalancersFunctions;
import com.pulumi.scaleway.loadbalancers.inputs.GetRouteArgs;
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 ip01 = new Ip("ip01");
var lb01 = new LoadBalancer("lb01", LoadBalancerArgs.builder()
.ipId(ip01.id())
.name("test-lb")
.type("lb-s")
.build());
var bkd01 = new Backend("bkd01", BackendArgs.builder()
.lbId(lb01.id())
.forwardProtocol("tcp")
.forwardPort(80)
.proxyProtocol("none")
.build());
var frt01 = new Frontend("frt01", FrontendArgs.builder()
.lbId(lb01.id())
.backendId(bkd01.id())
.inboundPort(80)
.build());
var rt01 = new Route("rt01", RouteArgs.builder()
.frontendId(frt01.id())
.backendId(bkd01.id())
.matchSni("sni.scaleway.com")
.build());
final var byID = LoadbalancersFunctions.getRoute(GetRouteArgs.builder()
.routeId(rt01.id())
.build());
}
}
resources:
ip01:
type: scaleway:loadbalancers:Ip
lb01:
type: scaleway:loadbalancers:LoadBalancer
properties:
ipId: ${ip01.id}
name: test-lb
type: lb-s
bkd01:
type: scaleway:loadbalancers:Backend
properties:
lbId: ${lb01.id}
forwardProtocol: tcp
forwardPort: 80
proxyProtocol: none
frt01:
type: scaleway:loadbalancers:Frontend
properties:
lbId: ${lb01.id}
backendId: ${bkd01.id}
inboundPort: 80
rt01:
type: scaleway:loadbalancers:Route
properties:
frontendId: ${frt01.id}
backendId: ${bkd01.id}
matchSni: sni.scaleway.com
variables:
byID:
fn::invoke:
function: scaleway:loadbalancers:getRoute
arguments:
routeId: ${rt01.id}
Using getRoute
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getRoute(args: GetRouteArgs, opts?: InvokeOptions): Promise<GetRouteResult>
function getRouteOutput(args: GetRouteOutputArgs, opts?: InvokeOptions): Output<GetRouteResult>
def get_route(route_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetRouteResult
def get_route_output(route_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetRouteResult]
func LookupRoute(ctx *Context, args *LookupRouteArgs, opts ...InvokeOption) (*LookupRouteResult, error)
func LookupRouteOutput(ctx *Context, args *LookupRouteOutputArgs, opts ...InvokeOption) LookupRouteResultOutput
> Note: This function is named LookupRoute
in the Go SDK.
public static class GetRoute
{
public static Task<GetRouteResult> InvokeAsync(GetRouteArgs args, InvokeOptions? opts = null)
public static Output<GetRouteResult> Invoke(GetRouteInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetRouteResult> getRoute(GetRouteArgs args, InvokeOptions options)
public static Output<GetRouteResult> getRoute(GetRouteArgs args, InvokeOptions options)
fn::invoke:
function: scaleway:loadbalancers/getRoute:getRoute
arguments:
# arguments dictionary
The following arguments are supported:
- Route
Id string - The route ID.
- Route
Id string - The route ID.
- route
Id String - The route ID.
- route
Id string - The route ID.
- route_
id str - The route ID.
- route
Id String - The route ID.
getRoute Result
The following output properties are available:
- Backend
Id string - Created
At string - Frontend
Id string - Id string
- The provider-assigned unique ID for this managed resource.
- Match
Host stringHeader - Match
Sni string - Route
Id string - Updated
At string
- Backend
Id string - Created
At string - Frontend
Id string - Id string
- The provider-assigned unique ID for this managed resource.
- Match
Host stringHeader - Match
Sni string - Route
Id string - Updated
At string
- backend
Id String - created
At String - frontend
Id String - id String
- The provider-assigned unique ID for this managed resource.
- match
Host StringHeader - match
Sni String - route
Id String - updated
At String
- backend
Id string - created
At string - frontend
Id string - id string
- The provider-assigned unique ID for this managed resource.
- match
Host stringHeader - match
Sni string - route
Id string - updated
At string
- backend_
id str - created_
at str - frontend_
id str - id str
- The provider-assigned unique ID for this managed resource.
- match_
host_ strheader - match_
sni str - route_
id str - updated_
at str
- backend
Id String - created
At String - frontend
Id String - id String
- The provider-assigned unique ID for this managed resource.
- match
Host StringHeader - match
Sni String - route
Id String - updated
At String
Package Details
- Repository
- scaleway pulumiverse/pulumi-scaleway
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
scaleway
Terraform Provider.