gcorelabs.Lblistener
Explore with Pulumi AI
Represent load balancer listener. Can not be created without load balancer. A listener is a process that checks for connection requests, using the protocol and port that you configure
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as gcore from "@pulumi/gcore";
const lb = new gcore.index.Gcore_loadbalancerv2("lb", {
projectId: 1,
regionId: 1,
name: "test",
flavor: "lb1-1-2",
});
const listener = new gcore.index.Gcore_lblistener("listener", {
projectId: 1,
regionId: 1,
name: "test",
protocol: "TCP",
protocolPort: 36621,
loadbalancerId: lb.id,
});
import pulumi
import pulumi_gcore as gcore
lb = gcore.index.Gcore_loadbalancerv2("lb",
project_id=1,
region_id=1,
name=test,
flavor=lb1-1-2)
listener = gcore.index.Gcore_lblistener("listener",
project_id=1,
region_id=1,
name=test,
protocol=TCP,
protocol_port=36621,
loadbalancer_id=lb.id)
package main
import (
"github.com/pulumi/pulumi-gcore/sdk/go/gcore"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
lb, err := gcore.NewGcore_loadbalancerv2(ctx, "lb", &gcore.Gcore_loadbalancerv2Args{
ProjectId: 1,
RegionId: 1,
Name: "test",
Flavor: "lb1-1-2",
})
if err != nil {
return err
}
_, err = gcore.NewGcore_lblistener(ctx, "listener", &gcore.Gcore_lblistenerArgs{
ProjectId: 1,
RegionId: 1,
Name: "test",
Protocol: "TCP",
ProtocolPort: 36621,
LoadbalancerId: lb.Id,
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcore = Pulumi.Gcore;
return await Deployment.RunAsync(() =>
{
var lb = new Gcore.Index.Gcore_loadbalancerv2("lb", new()
{
ProjectId = 1,
RegionId = 1,
Name = "test",
Flavor = "lb1-1-2",
});
var listener = new Gcore.Index.Gcore_lblistener("listener", new()
{
ProjectId = 1,
RegionId = 1,
Name = "test",
Protocol = "TCP",
ProtocolPort = 36621,
LoadbalancerId = lb.Id,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcore.gcore_loadbalancerv2;
import com.pulumi.gcore.Gcore_loadbalancerv2Args;
import com.pulumi.gcore.gcore_lblistener;
import com.pulumi.gcore.Gcore_lblistenerArgs;
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 lb = new Gcore_loadbalancerv2("lb", Gcore_loadbalancerv2Args.builder()
.projectId(1)
.regionId(1)
.name("test")
.flavor("lb1-1-2")
.build());
var listener = new Gcore_lblistener("listener", Gcore_lblistenerArgs.builder()
.projectId(1)
.regionId(1)
.name("test")
.protocol("TCP")
.protocolPort(36621)
.loadbalancerId(lb.id())
.build());
}
}
resources:
lb:
type: gcore:gcore_loadbalancerv2
properties:
projectId: 1
regionId: 1
name: test
flavor: lb1-1-2
listener:
type: gcore:gcore_lblistener
properties:
projectId: 1
regionId: 1
name: test
protocol: TCP
protocolPort: 36621
loadbalancerId: ${lb.id}
Create Lblistener Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Lblistener(name: string, args: LblistenerArgs, opts?: CustomResourceOptions);
@overload
def Lblistener(resource_name: str,
args: LblistenerArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Lblistener(resource_name: str,
opts: Optional[ResourceOptions] = None,
loadbalancer_id: Optional[str] = None,
protocol_port: Optional[float] = None,
protocol: Optional[str] = None,
project_name: Optional[str] = None,
name: Optional[str] = None,
project_id: Optional[float] = None,
insert_x_forwarded: Optional[bool] = None,
lblistener_id: Optional[str] = None,
last_updated: Optional[str] = None,
region_id: Optional[float] = None,
region_name: Optional[str] = None,
secret_id: Optional[str] = None,
sni_secret_ids: Optional[Sequence[str]] = None,
timeouts: Optional[LblistenerTimeoutsArgs] = None)
func NewLblistener(ctx *Context, name string, args LblistenerArgs, opts ...ResourceOption) (*Lblistener, error)
public Lblistener(string name, LblistenerArgs args, CustomResourceOptions? opts = null)
public Lblistener(String name, LblistenerArgs args)
public Lblistener(String name, LblistenerArgs args, CustomResourceOptions options)
type: gcorelabs:Lblistener
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 LblistenerArgs
- 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 LblistenerArgs
- 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 LblistenerArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args LblistenerArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args LblistenerArgs
- 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 lblistenerResource = new Gcorelabs.Lblistener("lblistenerResource", new()
{
LoadbalancerId = "string",
ProtocolPort = 0,
Protocol = "string",
ProjectName = "string",
Name = "string",
ProjectId = 0,
InsertXForwarded = false,
LblistenerId = "string",
LastUpdated = "string",
RegionId = 0,
RegionName = "string",
SecretId = "string",
SniSecretIds = new[]
{
"string",
},
Timeouts = new Gcorelabs.Inputs.LblistenerTimeoutsArgs
{
Create = "string",
Delete = "string",
},
});
example, err := gcorelabs.NewLblistener(ctx, "lblistenerResource", &gcorelabs.LblistenerArgs{
LoadbalancerId: pulumi.String("string"),
ProtocolPort: pulumi.Float64(0),
Protocol: pulumi.String("string"),
ProjectName: pulumi.String("string"),
Name: pulumi.String("string"),
ProjectId: pulumi.Float64(0),
InsertXForwarded: pulumi.Bool(false),
LblistenerId: pulumi.String("string"),
LastUpdated: pulumi.String("string"),
RegionId: pulumi.Float64(0),
RegionName: pulumi.String("string"),
SecretId: pulumi.String("string"),
SniSecretIds: pulumi.StringArray{
pulumi.String("string"),
},
Timeouts: &gcorelabs.LblistenerTimeoutsArgs{
Create: pulumi.String("string"),
Delete: pulumi.String("string"),
},
})
var lblistenerResource = new Lblistener("lblistenerResource", LblistenerArgs.builder()
.loadbalancerId("string")
.protocolPort(0)
.protocol("string")
.projectName("string")
.name("string")
.projectId(0)
.insertXForwarded(false)
.lblistenerId("string")
.lastUpdated("string")
.regionId(0)
.regionName("string")
.secretId("string")
.sniSecretIds("string")
.timeouts(LblistenerTimeoutsArgs.builder()
.create("string")
.delete("string")
.build())
.build());
lblistener_resource = gcorelabs.Lblistener("lblistenerResource",
loadbalancer_id="string",
protocol_port=0,
protocol="string",
project_name="string",
name="string",
project_id=0,
insert_x_forwarded=False,
lblistener_id="string",
last_updated="string",
region_id=0,
region_name="string",
secret_id="string",
sni_secret_ids=["string"],
timeouts={
"create": "string",
"delete": "string",
})
const lblistenerResource = new gcorelabs.Lblistener("lblistenerResource", {
loadbalancerId: "string",
protocolPort: 0,
protocol: "string",
projectName: "string",
name: "string",
projectId: 0,
insertXForwarded: false,
lblistenerId: "string",
lastUpdated: "string",
regionId: 0,
regionName: "string",
secretId: "string",
sniSecretIds: ["string"],
timeouts: {
create: "string",
"delete": "string",
},
});
type: gcorelabs:Lblistener
properties:
insertXForwarded: false
lastUpdated: string
lblistenerId: string
loadbalancerId: string
name: string
projectId: 0
projectName: string
protocol: string
protocolPort: 0
regionId: 0
regionName: string
secretId: string
sniSecretIds:
- string
timeouts:
create: string
delete: string
Lblistener 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 Lblistener resource accepts the following input properties:
- Loadbalancer
Id string - Protocol string
- Available values is 'HTTP', 'HTTPS', 'TCP', 'UDP', 'TERMINATED_HTTPS'
- Protocol
Port double - Insert
XForwarded bool - Insert *-forwarded headers
- Last
Updated string - Lblistener
Id string - The ID of this resource.
- Name string
- Project
Id double - Project
Name string - Region
Id double - Region
Name string - Secret
Id string - Sni
Secret List<string>Ids - Timeouts
Lblistener
Timeouts
- Loadbalancer
Id string - Protocol string
- Available values is 'HTTP', 'HTTPS', 'TCP', 'UDP', 'TERMINATED_HTTPS'
- Protocol
Port float64 - Insert
XForwarded bool - Insert *-forwarded headers
- Last
Updated string - Lblistener
Id string - The ID of this resource.
- Name string
- Project
Id float64 - Project
Name string - Region
Id float64 - Region
Name string - Secret
Id string - Sni
Secret []stringIds - Timeouts
Lblistener
Timeouts Args
- loadbalancer
Id String - protocol String
- Available values is 'HTTP', 'HTTPS', 'TCP', 'UDP', 'TERMINATED_HTTPS'
- protocol
Port Double - insert
XForwarded Boolean - Insert *-forwarded headers
- last
Updated String - lblistener
Id String - The ID of this resource.
- name String
- project
Id Double - project
Name String - region
Id Double - region
Name String - secret
Id String - sni
Secret List<String>Ids - timeouts
Lblistener
Timeouts
- loadbalancer
Id string - protocol string
- Available values is 'HTTP', 'HTTPS', 'TCP', 'UDP', 'TERMINATED_HTTPS'
- protocol
Port number - insert
XForwarded boolean - Insert *-forwarded headers
- last
Updated string - lblistener
Id string - The ID of this resource.
- name string
- project
Id number - project
Name string - region
Id number - region
Name string - secret
Id string - sni
Secret string[]Ids - timeouts
Lblistener
Timeouts
- loadbalancer_
id str - protocol str
- Available values is 'HTTP', 'HTTPS', 'TCP', 'UDP', 'TERMINATED_HTTPS'
- protocol_
port float - insert_
x_ boolforwarded - Insert *-forwarded headers
- last_
updated str - lblistener_
id str - The ID of this resource.
- name str
- project_
id float - project_
name str - region_
id float - region_
name str - secret_
id str - sni_
secret_ Sequence[str]ids - timeouts
Lblistener
Timeouts Args
- loadbalancer
Id String - protocol String
- Available values is 'HTTP', 'HTTPS', 'TCP', 'UDP', 'TERMINATED_HTTPS'
- protocol
Port Number - insert
XForwarded Boolean - Insert *-forwarded headers
- last
Updated String - lblistener
Id String - The ID of this resource.
- name String
- project
Id Number - project
Name String - region
Id Number - region
Name String - secret
Id String - sni
Secret List<String>Ids - timeouts Property Map
Outputs
All input properties are implicitly available as output properties. Additionally, the Lblistener resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Operating
Status string - Pool
Count double - Provisioning
Status string
- Id string
- The provider-assigned unique ID for this managed resource.
- Operating
Status string - Pool
Count float64 - Provisioning
Status string
- id String
- The provider-assigned unique ID for this managed resource.
- operating
Status String - pool
Count Double - provisioning
Status String
- id string
- The provider-assigned unique ID for this managed resource.
- operating
Status string - pool
Count number - provisioning
Status string
- id str
- The provider-assigned unique ID for this managed resource.
- operating_
status str - pool_
count float - provisioning_
status str
- id String
- The provider-assigned unique ID for this managed resource.
- operating
Status String - pool
Count Number - provisioning
Status String
Look up Existing Lblistener Resource
Get an existing Lblistener 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?: LblistenerState, opts?: CustomResourceOptions): Lblistener
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
insert_x_forwarded: Optional[bool] = None,
last_updated: Optional[str] = None,
lblistener_id: Optional[str] = None,
loadbalancer_id: Optional[str] = None,
name: Optional[str] = None,
operating_status: Optional[str] = None,
pool_count: Optional[float] = None,
project_id: Optional[float] = None,
project_name: Optional[str] = None,
protocol: Optional[str] = None,
protocol_port: Optional[float] = None,
provisioning_status: Optional[str] = None,
region_id: Optional[float] = None,
region_name: Optional[str] = None,
secret_id: Optional[str] = None,
sni_secret_ids: Optional[Sequence[str]] = None,
timeouts: Optional[LblistenerTimeoutsArgs] = None) -> Lblistener
func GetLblistener(ctx *Context, name string, id IDInput, state *LblistenerState, opts ...ResourceOption) (*Lblistener, error)
public static Lblistener Get(string name, Input<string> id, LblistenerState? state, CustomResourceOptions? opts = null)
public static Lblistener get(String name, Output<String> id, LblistenerState state, CustomResourceOptions options)
resources: _: type: gcorelabs:Lblistener 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.
- Insert
XForwarded bool - Insert *-forwarded headers
- Last
Updated string - Lblistener
Id string - The ID of this resource.
- Loadbalancer
Id string - Name string
- Operating
Status string - Pool
Count double - Project
Id double - Project
Name string - Protocol string
- Available values is 'HTTP', 'HTTPS', 'TCP', 'UDP', 'TERMINATED_HTTPS'
- Protocol
Port double - Provisioning
Status string - Region
Id double - Region
Name string - Secret
Id string - Sni
Secret List<string>Ids - Timeouts
Lblistener
Timeouts
- Insert
XForwarded bool - Insert *-forwarded headers
- Last
Updated string - Lblistener
Id string - The ID of this resource.
- Loadbalancer
Id string - Name string
- Operating
Status string - Pool
Count float64 - Project
Id float64 - Project
Name string - Protocol string
- Available values is 'HTTP', 'HTTPS', 'TCP', 'UDP', 'TERMINATED_HTTPS'
- Protocol
Port float64 - Provisioning
Status string - Region
Id float64 - Region
Name string - Secret
Id string - Sni
Secret []stringIds - Timeouts
Lblistener
Timeouts Args
- insert
XForwarded Boolean - Insert *-forwarded headers
- last
Updated String - lblistener
Id String - The ID of this resource.
- loadbalancer
Id String - name String
- operating
Status String - pool
Count Double - project
Id Double - project
Name String - protocol String
- Available values is 'HTTP', 'HTTPS', 'TCP', 'UDP', 'TERMINATED_HTTPS'
- protocol
Port Double - provisioning
Status String - region
Id Double - region
Name String - secret
Id String - sni
Secret List<String>Ids - timeouts
Lblistener
Timeouts
- insert
XForwarded boolean - Insert *-forwarded headers
- last
Updated string - lblistener
Id string - The ID of this resource.
- loadbalancer
Id string - name string
- operating
Status string - pool
Count number - project
Id number - project
Name string - protocol string
- Available values is 'HTTP', 'HTTPS', 'TCP', 'UDP', 'TERMINATED_HTTPS'
- protocol
Port number - provisioning
Status string - region
Id number - region
Name string - secret
Id string - sni
Secret string[]Ids - timeouts
Lblistener
Timeouts
- insert_
x_ boolforwarded - Insert *-forwarded headers
- last_
updated str - lblistener_
id str - The ID of this resource.
- loadbalancer_
id str - name str
- operating_
status str - pool_
count float - project_
id float - project_
name str - protocol str
- Available values is 'HTTP', 'HTTPS', 'TCP', 'UDP', 'TERMINATED_HTTPS'
- protocol_
port float - provisioning_
status str - region_
id float - region_
name str - secret_
id str - sni_
secret_ Sequence[str]ids - timeouts
Lblistener
Timeouts Args
- insert
XForwarded Boolean - Insert *-forwarded headers
- last
Updated String - lblistener
Id String - The ID of this resource.
- loadbalancer
Id String - name String
- operating
Status String - pool
Count Number - project
Id Number - project
Name String - protocol String
- Available values is 'HTTP', 'HTTPS', 'TCP', 'UDP', 'TERMINATED_HTTPS'
- protocol
Port Number - provisioning
Status String - region
Id Number - region
Name String - secret
Id String - sni
Secret List<String>Ids - timeouts Property Map
Supporting Types
LblistenerTimeouts, LblistenerTimeoutsArgs
Import
import using <project_id>:<region_id>:<lblistener_id>:<loadbalancer_id> format
$ pulumi import gcorelabs:index/lblistener:Lblistener lblistener1 1:6:a775dd94-4e9c-4da7-9f0e-ffc9ae34446b:447d2959-8ae0-4ca0-8d47-9f050a3637d7
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- gcorelabs g-core/terraform-provider-gcorelabs
- License
- Notes
- This Pulumi package is based on the
gcorelabs
Terraform Provider.