Scaleway v1.20.0 published on Monday, Nov 4, 2024 by pulumiverse
scaleway.getLbRoute
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.LoadbalancerIp("ip01", {});
const lb01 = new scaleway.Loadbalancer("lb01", {
ipId: ip01.id,
name: "test-lb",
type: "lb-s",
});
const bkd01 = new scaleway.LoadbalancerBackend("bkd01", {
lbId: lb01.id,
forwardProtocol: "tcp",
forwardPort: 80,
proxyProtocol: "none",
});
const frt01 = new scaleway.LoadbalancerFrontend("frt01", {
lbId: lb01.id,
backendId: bkd01.id,
inboundPort: 80,
});
const rt01 = new scaleway.LoadbalancerRoute("rt01", {
frontendId: frt01.id,
backendId: bkd01.id,
matchSni: "sni.scaleway.com",
});
const byID = scaleway.getLbRouteOutput({
routeId: rt01.id,
});
import pulumi
import pulumi_scaleway as scaleway
import pulumiverse_scaleway as scaleway
ip01 = scaleway.LoadbalancerIp("ip01")
lb01 = scaleway.Loadbalancer("lb01",
ip_id=ip01.id,
name="test-lb",
type="lb-s")
bkd01 = scaleway.LoadbalancerBackend("bkd01",
lb_id=lb01.id,
forward_protocol="tcp",
forward_port=80,
proxy_protocol="none")
frt01 = scaleway.LoadbalancerFrontend("frt01",
lb_id=lb01.id,
backend_id=bkd01.id,
inbound_port=80)
rt01 = scaleway.LoadbalancerRoute("rt01",
frontend_id=frt01.id,
backend_id=bkd01.id,
match_sni="sni.scaleway.com")
by_id = scaleway.get_lb_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"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
ip01, err := scaleway.NewLoadbalancerIp(ctx, "ip01", nil)
if err != nil {
return err
}
lb01, err := scaleway.NewLoadbalancer(ctx, "lb01", &scaleway.LoadbalancerArgs{
IpId: ip01.ID(),
Name: pulumi.String("test-lb"),
Type: pulumi.String("lb-s"),
})
if err != nil {
return err
}
bkd01, err := scaleway.NewLoadbalancerBackend(ctx, "bkd01", &scaleway.LoadbalancerBackendArgs{
LbId: lb01.ID(),
ForwardProtocol: pulumi.String("tcp"),
ForwardPort: pulumi.Int(80),
ProxyProtocol: pulumi.String("none"),
})
if err != nil {
return err
}
frt01, err := scaleway.NewLoadbalancerFrontend(ctx, "frt01", &scaleway.LoadbalancerFrontendArgs{
LbId: lb01.ID(),
BackendId: bkd01.ID(),
InboundPort: pulumi.Int(80),
})
if err != nil {
return err
}
rt01, err := scaleway.NewLoadbalancerRoute(ctx, "rt01", &scaleway.LoadbalancerRouteArgs{
FrontendId: frt01.ID(),
BackendId: bkd01.ID(),
MatchSni: pulumi.String("sni.scaleway.com"),
})
if err != nil {
return err
}
_ = scaleway.GetLbRouteOutput(ctx, scaleway.GetLbRouteOutputArgs{
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.LoadbalancerIp("ip01");
var lb01 = new Scaleway.Loadbalancer("lb01", new()
{
IpId = ip01.Id,
Name = "test-lb",
Type = "lb-s",
});
var bkd01 = new Scaleway.LoadbalancerBackend("bkd01", new()
{
LbId = lb01.Id,
ForwardProtocol = "tcp",
ForwardPort = 80,
ProxyProtocol = "none",
});
var frt01 = new Scaleway.LoadbalancerFrontend("frt01", new()
{
LbId = lb01.Id,
BackendId = bkd01.Id,
InboundPort = 80,
});
var rt01 = new Scaleway.LoadbalancerRoute("rt01", new()
{
FrontendId = frt01.Id,
BackendId = bkd01.Id,
MatchSni = "sni.scaleway.com",
});
var byID = Scaleway.GetLbRoute.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.LoadbalancerIp;
import com.pulumi.scaleway.Loadbalancer;
import com.pulumi.scaleway.LoadbalancerArgs;
import com.pulumi.scaleway.LoadbalancerBackend;
import com.pulumi.scaleway.LoadbalancerBackendArgs;
import com.pulumi.scaleway.LoadbalancerFrontend;
import com.pulumi.scaleway.LoadbalancerFrontendArgs;
import com.pulumi.scaleway.LoadbalancerRoute;
import com.pulumi.scaleway.LoadbalancerRouteArgs;
import com.pulumi.scaleway.ScalewayFunctions;
import com.pulumi.scaleway.inputs.GetLbRouteArgs;
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 LoadbalancerIp("ip01");
var lb01 = new Loadbalancer("lb01", LoadbalancerArgs.builder()
.ipId(ip01.id())
.name("test-lb")
.type("lb-s")
.build());
var bkd01 = new LoadbalancerBackend("bkd01", LoadbalancerBackendArgs.builder()
.lbId(lb01.id())
.forwardProtocol("tcp")
.forwardPort(80)
.proxyProtocol("none")
.build());
var frt01 = new LoadbalancerFrontend("frt01", LoadbalancerFrontendArgs.builder()
.lbId(lb01.id())
.backendId(bkd01.id())
.inboundPort(80)
.build());
var rt01 = new LoadbalancerRoute("rt01", LoadbalancerRouteArgs.builder()
.frontendId(frt01.id())
.backendId(bkd01.id())
.matchSni("sni.scaleway.com")
.build());
final var byID = ScalewayFunctions.getLbRoute(GetLbRouteArgs.builder()
.routeId(rt01.id())
.build());
}
}
resources:
ip01:
type: scaleway:LoadbalancerIp
lb01:
type: scaleway:Loadbalancer
properties:
ipId: ${ip01.id}
name: test-lb
type: lb-s
bkd01:
type: scaleway:LoadbalancerBackend
properties:
lbId: ${lb01.id}
forwardProtocol: tcp
forwardPort: 80
proxyProtocol: none
frt01:
type: scaleway:LoadbalancerFrontend
properties:
lbId: ${lb01.id}
backendId: ${bkd01.id}
inboundPort: 80
rt01:
type: scaleway:LoadbalancerRoute
properties:
frontendId: ${frt01.id}
backendId: ${bkd01.id}
matchSni: sni.scaleway.com
variables:
byID:
fn::invoke:
Function: scaleway:getLbRoute
Arguments:
routeId: ${rt01.id}
Using getLbRoute
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 getLbRoute(args: GetLbRouteArgs, opts?: InvokeOptions): Promise<GetLbRouteResult>
function getLbRouteOutput(args: GetLbRouteOutputArgs, opts?: InvokeOptions): Output<GetLbRouteResult>
def get_lb_route(route_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetLbRouteResult
def get_lb_route_output(route_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetLbRouteResult]
func GetLbRoute(ctx *Context, args *GetLbRouteArgs, opts ...InvokeOption) (*GetLbRouteResult, error)
func GetLbRouteOutput(ctx *Context, args *GetLbRouteOutputArgs, opts ...InvokeOption) GetLbRouteResultOutput
> Note: This function is named GetLbRoute
in the Go SDK.
public static class GetLbRoute
{
public static Task<GetLbRouteResult> InvokeAsync(GetLbRouteArgs args, InvokeOptions? opts = null)
public static Output<GetLbRouteResult> Invoke(GetLbRouteInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetLbRouteResult> getLbRoute(GetLbRouteArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: scaleway:index/getLbRoute:getLbRoute
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.
getLbRoute 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.