1. Packages
  2. Scaleway
  3. API Docs
  4. getLbFrontend
Scaleway v1.12.1 published on Monday, Apr 15, 2024 by pulumiverse

scaleway.getLbFrontend

Explore with Pulumi AI

scaleway logo
Scaleway v1.12.1 published on Monday, Apr 15, 2024 by pulumiverse

    Get information about Scaleway Load-Balancer Frontends. For more information, see the 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,
        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,
    });
    
    import pulumi
    import pulumi_scaleway as scaleway
    import pulumiverse_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)
    
    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(),
    			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
    	})
    }
    
    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,
            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 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());
    
        }
    }
    
    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<Pulumiverse.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 List<Pulumiverse.Scaleway.Inputs.GetLbFrontendAclAction>
    Action to undertake when an ACL filter matches
    CreatedAt string
    Date and time of ACL's creation (RFC 3339 format)
    Description string
    Description of the ACL
    Matches List<Pulumiverse.Scaleway.Inputs.GetLbFrontendAclMatch>
    The ACL match rule
    Name string
    The name of the frontend.

    • When using the name you should specify the lb-id
    UpdatedAt string
    Date and time of ACL's update (RFC 3339 format)
    Actions []GetLbFrontendAclAction
    Action to undertake when an ACL filter matches
    CreatedAt string
    Date and time of ACL's creation (RFC 3339 format)
    Description string
    Description of the ACL
    Matches []GetLbFrontendAclMatch
    The ACL match rule
    Name string
    The name of the frontend.

    • When using the name you should specify the lb-id
    UpdatedAt string
    Date and time of ACL's update (RFC 3339 format)
    actions List<GetLbFrontendAclAction>
    Action to undertake when an ACL filter matches
    createdAt String
    Date and time of ACL's creation (RFC 3339 format)
    description String
    Description of the ACL
    matches List<GetLbFrontendAclMatch>
    The ACL match rule
    name String
    The name of the frontend.

    • When using the name you should specify the lb-id
    updatedAt String
    Date and time of ACL's update (RFC 3339 format)
    actions GetLbFrontendAclAction[]
    Action to undertake when an ACL filter matches
    createdAt string
    Date and time of ACL's creation (RFC 3339 format)
    description string
    Description of the ACL
    matches GetLbFrontendAclMatch[]
    The ACL match rule
    name string
    The name of the frontend.

    • When using the name you should specify the lb-id
    updatedAt string
    Date and time of ACL's update (RFC 3339 format)
    actions Sequence[GetLbFrontendAclAction]
    Action to undertake when an ACL filter matches
    created_at str
    Date and time of ACL's creation (RFC 3339 format)
    description str
    Description of the ACL
    matches Sequence[GetLbFrontendAclMatch]
    The ACL match rule
    name str
    The name of the frontend.

    • When using the name you should specify the lb-id
    updated_at str
    Date and time of ACL's update (RFC 3339 format)
    actions List<Property Map>
    Action to undertake when an ACL filter matches
    createdAt String
    Date and time of ACL's creation (RFC 3339 format)
    description String
    Description of the ACL
    matches List<Property Map>
    The ACL match rule
    name String
    The name of the frontend.

    • When using the name you should specify the lb-id
    updatedAt String
    Date and time of ACL's update (RFC 3339 format)

    GetLbFrontendAclAction

    Redirects List<Pulumiverse.Scaleway.Inputs.GetLbFrontendAclActionRedirect>
    Redirect parameters when using an ACL with redirect action
    Type string
    The action type
    Redirects []GetLbFrontendAclActionRedirect
    Redirect parameters when using an ACL with redirect action
    Type string
    The action type
    redirects List<GetLbFrontendAclActionRedirect>
    Redirect parameters when using an ACL with redirect action
    type String
    The action type
    redirects GetLbFrontendAclActionRedirect[]
    Redirect parameters when using an ACL with redirect action
    type string
    The action type
    redirects Sequence[GetLbFrontendAclActionRedirect]
    Redirect parameters when using an ACL with redirect action
    type str
    The action type
    redirects List<Property Map>
    Redirect parameters when using an ACL with redirect action
    type String
    The action type

    GetLbFrontendAclActionRedirect

    Code int
    The HTTP redirect code to use
    Target string
    An URL can be used in case of a location redirect
    Type string
    The redirect type
    Code int
    The HTTP redirect code to use
    Target string
    An URL can be used in case of a location redirect
    Type string
    The redirect type
    code Integer
    The HTTP redirect code to use
    target String
    An URL can be used in case of a location redirect
    type String
    The redirect type
    code number
    The HTTP redirect code to use
    target string
    An URL can be used in case of a location redirect
    type string
    The redirect type
    code int
    The HTTP redirect code to use
    target str
    An URL can be used in case of a location redirect
    type str
    The redirect type
    code Number
    The HTTP redirect code to use
    target String
    An URL can be used in case of a location redirect
    type String
    The redirect type

    GetLbFrontendAclMatch

    HttpFilter string
    The HTTP filter to match
    HttpFilterOption string
    You can use this field with http_header_match acl type to set the header name to filter
    HttpFilterValues List<string>
    A list of possible values to match for the given HTTP filter
    Invert bool
    If set to true, the condition will be of type "unless"
    IpSubnets List<string>
    A list of IPs or CIDR v4/v6 addresses of the client of the session to match
    HttpFilter string
    The HTTP filter to match
    HttpFilterOption string
    You can use this field with http_header_match acl type to set the header name to filter
    HttpFilterValues []string
    A list of possible values to match for the given HTTP filter
    Invert bool
    If set to true, the condition will be of type "unless"
    IpSubnets []string
    A list of IPs or CIDR v4/v6 addresses of the client of the session to match
    httpFilter String
    The HTTP filter to match
    httpFilterOption String
    You can use this field with http_header_match acl type to set the header name to filter
    httpFilterValues List<String>
    A list of possible values to match for the given HTTP filter
    invert Boolean
    If set to true, the condition will be of type "unless"
    ipSubnets List<String>
    A list of IPs or CIDR v4/v6 addresses of the client of the session to match
    httpFilter string
    The HTTP filter to match
    httpFilterOption string
    You can use this field with http_header_match acl type to set the header name to filter
    httpFilterValues string[]
    A list of possible values to match for the given HTTP filter
    invert boolean
    If set to true, the condition will be of type "unless"
    ipSubnets string[]
    A list of IPs or CIDR v4/v6 addresses of the client of the session to match
    http_filter str
    The HTTP filter to match
    http_filter_option str
    You can use this field with http_header_match acl type to set the header name to filter
    http_filter_values Sequence[str]
    A list of possible values to match for the given HTTP filter
    invert bool
    If set to true, the condition will be of type "unless"
    ip_subnets Sequence[str]
    A list of IPs or CIDR v4/v6 addresses of the client of the session to match
    httpFilter String
    The HTTP filter to match
    httpFilterOption String
    You can use this field with http_header_match acl type to set the header name to filter
    httpFilterValues List<String>
    A list of possible values to match for the given HTTP filter
    invert Boolean
    If set to true, the condition will be of type "unless"
    ipSubnets List<String>
    A list of IPs or CIDR v4/v6 addresses of the client of the session to match

    Package Details

    Repository
    scaleway pulumiverse/pulumi-scaleway
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the scaleway Terraform Provider.
    scaleway logo
    Scaleway v1.12.1 published on Monday, Apr 15, 2024 by pulumiverse