1. Packages
  2. Scaleway
  3. API Docs
  4. getLbFrontend
Scaleway v1.10.0 published on Saturday, Jul 1, 2023 by lbrlabs

scaleway.getLbFrontend

Explore with Pulumi AI

scaleway logo
Scaleway v1.10.0 published on Saturday, Jul 1, 2023 by lbrlabs

    Get information about Scaleway Load-Balancer Frontends. For more information, see the documentation.

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Scaleway = Lbrlabs.PulumiPackage.Scaleway;
    using Scaleway = Pulumi.Scaleway;
    
    return await Deployment.RunAsync(() => 
    {
        var ip01 = new Scaleway.LoadbalancerIp("ip01");
    
        var lb01 = new Scaleway.Loadbalancer("lb01", new()
        {
            IpId = ip01.Id,
            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 byID = Scaleway.GetLbFrontend.Invoke(new()
        {
            FrontendId = frt01.Id,
        });
    
        var byName = Scaleway.GetLbFrontend.Invoke(new()
        {
            Name = frt01.Name,
            LbId = lb01.Id,
        });
    
    });
    
    package main
    
    import (
    	"github.com/lbrlabs/pulumi-scaleway/sdk/go/scaleway"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    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(),
    			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
    		}
    		_ = scaleway.GetLbFrontendOutput(ctx, scaleway.GetLbFrontendOutputArgs{
    			FrontendId: frt01.ID(),
    		}, nil)
    		_ = scaleway.GetLbFrontendOutput(ctx, scaleway.GetLbFrontendOutputArgs{
    			Name: frt01.Name,
    			LbId: lb01.ID(),
    		}, nil)
    		return nil
    	})
    }
    
    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.ScalewayFunctions;
    import com.pulumi.scaleway.inputs.GetLbFrontendArgs;
    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())
                .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());
    
            final var byID = ScalewayFunctions.getLbFrontend(GetLbFrontendArgs.builder()
                .frontendId(frt01.id())
                .build());
    
            final var byName = ScalewayFunctions.getLbFrontend(GetLbFrontendArgs.builder()
                .name(frt01.name())
                .lbId(lb01.id())
                .build());
    
        }
    }
    
    import pulumi
    import lbrlabs_pulumi_scaleway as scaleway
    import pulumi_scaleway as scaleway
    
    ip01 = scaleway.LoadbalancerIp("ip01")
    lb01 = scaleway.Loadbalancer("lb01",
        ip_id=ip01.id,
        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)
    by_id = scaleway.get_lb_frontend_output(frontend_id=frt01.id)
    by_name = scaleway.get_lb_frontend_output(name=frt01.name,
        lb_id=lb01.id)
    
    import * as pulumi from "@pulumi/pulumi";
    import * as scaleway from "@lbrlabs/pulumi-scaleway";
    import * as scaleway from "@pulumi/scaleway";
    
    const ip01 = new scaleway.LoadbalancerIp("ip01", {});
    const lb01 = new scaleway.Loadbalancer("lb01", {
        ipId: ip01.id,
        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 byID = scaleway.getLbFrontendOutput({
        frontendId: frt01.id,
    });
    const byName = scaleway.getLbFrontendOutput({
        name: frt01.name,
        lbId: lb01.id,
    });
    
    resources:
      ip01:
        type: scaleway:LoadbalancerIp
      lb01:
        type: scaleway:Loadbalancer
        properties:
          ipId: ${ip01.id}
          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
    variables:
      byID:
        fn::invoke:
          Function: scaleway:getLbFrontend
          Arguments:
            frontendId: ${frt01.id}
      byName:
        fn::invoke:
          Function: scaleway:getLbFrontend
          Arguments:
            name: ${frt01.name}
            lbId: ${lb01.id}
    

    Using getLbFrontend

    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 getLbFrontend(args: GetLbFrontendArgs, opts?: InvokeOptions): Promise<GetLbFrontendResult>
    function getLbFrontendOutput(args: GetLbFrontendOutputArgs, opts?: InvokeOptions): Output<GetLbFrontendResult>
    def get_lb_frontend(frontend_id: Optional[str] = None,
                        lb_id: Optional[str] = None,
                        name: Optional[str] = None,
                        opts: Optional[InvokeOptions] = None) -> GetLbFrontendResult
    def get_lb_frontend_output(frontend_id: Optional[pulumi.Input[str]] = None,
                        lb_id: Optional[pulumi.Input[str]] = None,
                        name: Optional[pulumi.Input[str]] = None,
                        opts: Optional[InvokeOptions] = None) -> Output[GetLbFrontendResult]
    func GetLbFrontend(ctx *Context, args *GetLbFrontendArgs, opts ...InvokeOption) (*GetLbFrontendResult, error)
    func GetLbFrontendOutput(ctx *Context, args *GetLbFrontendOutputArgs, opts ...InvokeOption) GetLbFrontendResultOutput

    > Note: This function is named GetLbFrontend in the Go SDK.

    public static class GetLbFrontend 
    {
        public static Task<GetLbFrontendResult> InvokeAsync(GetLbFrontendArgs args, InvokeOptions? opts = null)
        public static Output<GetLbFrontendResult> Invoke(GetLbFrontendInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetLbFrontendResult> getLbFrontend(GetLbFrontendArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: scaleway:index/getLbFrontend:getLbFrontend
      arguments:
        # arguments dictionary

    The following arguments are supported:

    FrontendId string

    The frontend id.

    • Only one of name and frontend_id should be specified.
    LbId string

    The load-balancer ID this frontend is attached to.

    Name string

    The name of the frontend.

    • When using the name you should specify the lb-id
    FrontendId string

    The frontend id.

    • Only one of name and frontend_id should be specified.
    LbId string

    The load-balancer ID this frontend is attached to.

    Name string

    The name of the frontend.

    • When using the name you should specify the lb-id
    frontendId String

    The frontend id.

    • Only one of name and frontend_id should be specified.
    lbId String

    The load-balancer ID this frontend is attached to.

    name String

    The name of the frontend.

    • When using the name you should specify the lb-id
    frontendId string

    The frontend id.

    • Only one of name and frontend_id should be specified.
    lbId string

    The load-balancer ID this frontend is attached to.

    name string

    The name of the frontend.

    • When using the name you should specify the lb-id
    frontend_id str

    The frontend id.

    • Only one of name and frontend_id should be specified.
    lb_id str

    The load-balancer ID this frontend is attached to.

    name str

    The name of the frontend.

    • When using the name you should specify the lb-id
    frontendId String

    The frontend id.

    • Only one of name and frontend_id should be specified.
    lbId String

    The load-balancer ID this frontend is attached to.

    name String

    The name of the frontend.

    • When using the name you should specify the lb-id

    getLbFrontend Result

    The following output properties are available:

    Acls List<Lbrlabs.PulumiPackage.Scaleway.Outputs.GetLbFrontendAcl>
    BackendId string
    CertificateId string
    CertificateIds List<string>
    EnableHttp3 bool
    ExternalAcls bool
    Id string

    The provider-assigned unique ID for this managed resource.

    InboundPort int
    TimeoutClient string
    FrontendId string
    LbId string
    Name string
    Acls []GetLbFrontendAcl
    BackendId string
    CertificateId string
    CertificateIds []string
    EnableHttp3 bool
    ExternalAcls bool
    Id string

    The provider-assigned unique ID for this managed resource.

    InboundPort int
    TimeoutClient string
    FrontendId string
    LbId string
    Name string
    acls List<GetLbFrontendAcl>
    backendId String
    certificateId String
    certificateIds List<String>
    enableHttp3 Boolean
    externalAcls Boolean
    id String

    The provider-assigned unique ID for this managed resource.

    inboundPort Integer
    timeoutClient String
    frontendId String
    lbId String
    name String
    acls GetLbFrontendAcl[]
    backendId string
    certificateId string
    certificateIds string[]
    enableHttp3 boolean
    externalAcls boolean
    id string

    The provider-assigned unique ID for this managed resource.

    inboundPort number
    timeoutClient string
    frontendId string
    lbId string
    name string
    acls Sequence[GetLbFrontendAcl]
    backend_id str
    certificate_id str
    certificate_ids Sequence[str]
    enable_http3 bool
    external_acls bool
    id str

    The provider-assigned unique ID for this managed resource.

    inbound_port int
    timeout_client str
    frontend_id str
    lb_id str
    name str
    acls List<Property Map>
    backendId String
    certificateId String
    certificateIds List<String>
    enableHttp3 Boolean
    externalAcls Boolean
    id String

    The provider-assigned unique ID for this managed resource.

    inboundPort Number
    timeoutClient String
    frontendId String
    lbId String
    name String

    Supporting Types

    GetLbFrontendAcl

    Actions []GetLbFrontendAclAction
    CreatedAt string
    Description string
    Matches []GetLbFrontendAclMatch
    Name string

    The name of the frontend.

    • When using the name you should specify the lb-id
    UpdatedAt string
    actions List<GetLbFrontendAclAction>
    createdAt String
    description String
    matches List<GetLbFrontendAclMatch>
    name String

    The name of the frontend.

    • When using the name you should specify the lb-id
    updatedAt String
    actions GetLbFrontendAclAction[]
    createdAt string
    description string
    matches GetLbFrontendAclMatch[]
    name string

    The name of the frontend.

    • When using the name you should specify the lb-id
    updatedAt string
    actions Sequence[GetLbFrontendAclAction]
    created_at str
    description str
    matches Sequence[GetLbFrontendAclMatch]
    name str

    The name of the frontend.

    • When using the name you should specify the lb-id
    updated_at str
    actions List<Property Map>
    createdAt String
    description String
    matches List<Property Map>
    name String

    The name of the frontend.

    • When using the name you should specify the lb-id
    updatedAt String

    GetLbFrontendAclAction

    GetLbFrontendAclActionRedirect

    Code int
    Target string
    Type string
    Code int
    Target string
    Type string
    code Integer
    target String
    type String
    code number
    target string
    type string
    code int
    target str
    type str
    code Number
    target String
    type String

    GetLbFrontendAclMatch

    HttpFilter string
    HttpFilterOption string
    HttpFilterValues List<string>
    Invert bool
    IpSubnets List<string>
    httpFilter String
    httpFilterOption String
    httpFilterValues List<String>
    invert Boolean
    ipSubnets List<String>
    httpFilter string
    httpFilterOption string
    httpFilterValues string[]
    invert boolean
    ipSubnets string[]
    httpFilter String
    httpFilterOption String
    httpFilterValues List<String>
    invert Boolean
    ipSubnets List<String>

    Package Details

    Repository
    scaleway lbrlabs/pulumi-scaleway
    License
    Apache-2.0
    Notes

    This Pulumi package is based on the scaleway Terraform Provider.

    scaleway logo
    Scaleway v1.10.0 published on Saturday, Jul 1, 2023 by lbrlabs