exoscale.Nlb
Explore with Pulumi AI
Manage Exoscale Network Load Balancers (NLB).
Corresponding data source: exoscale_nlb.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as exoscale from "@pulumiverse/exoscale";
const myNlb = new exoscale.Nlb("myNlb", {zone: "ch-gva-2"});
import pulumi
import pulumiverse_exoscale as exoscale
my_nlb = exoscale.Nlb("myNlb", zone="ch-gva-2")
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumiverse/pulumi-exoscale/sdk/go/exoscale"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := exoscale.NewNlb(ctx, "myNlb", &exoscale.NlbArgs{
Zone: pulumi.String("ch-gva-2"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Exoscale = Pulumiverse.Exoscale;
return await Deployment.RunAsync(() =>
{
var myNlb = new Exoscale.Nlb("myNlb", new()
{
Zone = "ch-gva-2",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.exoscale.Nlb;
import com.pulumi.exoscale.NlbArgs;
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 myNlb = new Nlb("myNlb", NlbArgs.builder()
.zone("ch-gva-2")
.build());
}
}
resources:
myNlb:
type: exoscale:Nlb
properties:
zone: ch-gva-2
Next step is to attach exoscale_nlb_service(s) to the NLB.
Please refer to the examples directory for complete configuration examples.
Create Nlb Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Nlb(name: string, args: NlbArgs, opts?: CustomResourceOptions);
@overload
def Nlb(resource_name: str,
args: NlbArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Nlb(resource_name: str,
opts: Optional[ResourceOptions] = None,
zone: Optional[str] = None,
description: Optional[str] = None,
labels: Optional[Mapping[str, str]] = None,
name: Optional[str] = None)
func NewNlb(ctx *Context, name string, args NlbArgs, opts ...ResourceOption) (*Nlb, error)
public Nlb(string name, NlbArgs args, CustomResourceOptions? opts = null)
type: exoscale:Nlb
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 NlbArgs
- 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 NlbArgs
- 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 NlbArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args NlbArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args NlbArgs
- 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 nlbResource = new Exoscale.Nlb("nlbResource", new()
{
Zone = "string",
Description = "string",
Labels =
{
{ "string", "string" },
},
Name = "string",
});
example, err := exoscale.NewNlb(ctx, "nlbResource", &exoscale.NlbArgs{
Zone: pulumi.String("string"),
Description: pulumi.String("string"),
Labels: pulumi.StringMap{
"string": pulumi.String("string"),
},
Name: pulumi.String("string"),
})
var nlbResource = new Nlb("nlbResource", NlbArgs.builder()
.zone("string")
.description("string")
.labels(Map.of("string", "string"))
.name("string")
.build());
nlb_resource = exoscale.Nlb("nlbResource",
zone="string",
description="string",
labels={
"string": "string",
},
name="string")
const nlbResource = new exoscale.Nlb("nlbResource", {
zone: "string",
description: "string",
labels: {
string: "string",
},
name: "string",
});
type: exoscale:Nlb
properties:
description: string
labels:
string: string
name: string
zone: string
Nlb 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 Nlb resource accepts the following input properties:
- Zone string
- ❗ The Exoscale Zone name.
- Description string
- A free-form text describing the NLB.
- Labels Dictionary<string, string>
- A map of key/value labels.
- Name string
- The network load balancer (NLB) name.
- Zone string
- ❗ The Exoscale Zone name.
- Description string
- A free-form text describing the NLB.
- Labels map[string]string
- A map of key/value labels.
- Name string
- The network load balancer (NLB) name.
- zone String
- ❗ The Exoscale Zone name.
- description String
- A free-form text describing the NLB.
- labels Map<String,String>
- A map of key/value labels.
- name String
- The network load balancer (NLB) name.
- zone string
- ❗ The Exoscale Zone name.
- description string
- A free-form text describing the NLB.
- labels {[key: string]: string}
- A map of key/value labels.
- name string
- The network load balancer (NLB) name.
- zone str
- ❗ The Exoscale Zone name.
- description str
- A free-form text describing the NLB.
- labels Mapping[str, str]
- A map of key/value labels.
- name str
- The network load balancer (NLB) name.
- zone String
- ❗ The Exoscale Zone name.
- description String
- A free-form text describing the NLB.
- labels Map<String>
- A map of key/value labels.
- name String
- The network load balancer (NLB) name.
Outputs
All input properties are implicitly available as output properties. Additionally, the Nlb resource produces the following output properties:
- created_
at str - The NLB creation date.
- id str
- The provider-assigned unique ID for this managed resource.
- ip_
address str - The NLB IPv4 address.
- services Sequence[str]
- The list of the exoscalenlbservice (names).
- state str
- The current NLB state.
Look up Existing Nlb Resource
Get an existing Nlb 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?: NlbState, opts?: CustomResourceOptions): Nlb
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
created_at: Optional[str] = None,
description: Optional[str] = None,
ip_address: Optional[str] = None,
labels: Optional[Mapping[str, str]] = None,
name: Optional[str] = None,
services: Optional[Sequence[str]] = None,
state: Optional[str] = None,
zone: Optional[str] = None) -> Nlb
func GetNlb(ctx *Context, name string, id IDInput, state *NlbState, opts ...ResourceOption) (*Nlb, error)
public static Nlb Get(string name, Input<string> id, NlbState? state, CustomResourceOptions? opts = null)
public static Nlb get(String name, Output<String> id, NlbState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- 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.
- Created
At string - The NLB creation date.
- Description string
- A free-form text describing the NLB.
- Ip
Address string - The NLB IPv4 address.
- Labels Dictionary<string, string>
- A map of key/value labels.
- Name string
- The network load balancer (NLB) name.
- Services List<string>
- The list of the exoscalenlbservice (names).
- State string
- The current NLB state.
- Zone string
- ❗ The Exoscale Zone name.
- Created
At string - The NLB creation date.
- Description string
- A free-form text describing the NLB.
- Ip
Address string - The NLB IPv4 address.
- Labels map[string]string
- A map of key/value labels.
- Name string
- The network load balancer (NLB) name.
- Services []string
- The list of the exoscalenlbservice (names).
- State string
- The current NLB state.
- Zone string
- ❗ The Exoscale Zone name.
- created
At String - The NLB creation date.
- description String
- A free-form text describing the NLB.
- ip
Address String - The NLB IPv4 address.
- labels Map<String,String>
- A map of key/value labels.
- name String
- The network load balancer (NLB) name.
- services List<String>
- The list of the exoscalenlbservice (names).
- state String
- The current NLB state.
- zone String
- ❗ The Exoscale Zone name.
- created
At string - The NLB creation date.
- description string
- A free-form text describing the NLB.
- ip
Address string - The NLB IPv4 address.
- labels {[key: string]: string}
- A map of key/value labels.
- name string
- The network load balancer (NLB) name.
- services string[]
- The list of the exoscalenlbservice (names).
- state string
- The current NLB state.
- zone string
- ❗ The Exoscale Zone name.
- created_
at str - The NLB creation date.
- description str
- A free-form text describing the NLB.
- ip_
address str - The NLB IPv4 address.
- labels Mapping[str, str]
- A map of key/value labels.
- name str
- The network load balancer (NLB) name.
- services Sequence[str]
- The list of the exoscalenlbservice (names).
- state str
- The current NLB state.
- zone str
- ❗ The Exoscale Zone name.
- created
At String - The NLB creation date.
- description String
- A free-form text describing the NLB.
- ip
Address String - The NLB IPv4 address.
- labels Map<String>
- A map of key/value labels.
- name String
- The network load balancer (NLB) name.
- services List<String>
- The list of the exoscalenlbservice (names).
- state String
- The current NLB state.
- zone String
- ❗ The Exoscale Zone name.
Import
An existing network load balancer (NLB) may be imported by <ID>@<zone>
:
console
$ pulumi import exoscale:index/nlb:Nlb \
exoscale_nlb.my_nlb \
f81d4fae-7dec-11d0-a765-00a0c91e6bf6@ch-gva-2
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- exoscale pulumiverse/pulumi-exoscale
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
exoscale
Terraform Provider.