Show / Hide Table of Contents

Class NodeBalancerNode

Provides a Linode NodeBalancer Node resource. This can be used to create, modify, and delete Linodes NodeBalancer Nodes. For more information, see Getting Started with NodeBalancers and the Linode APIv4 docs.

Example Usage

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Linode = Pulumi.Linode;

class MyStack : Stack
{
public MyStack()
{
    var web = new List<Linode.Instance>();
    for (var rangeIndex = 0; rangeIndex < 3; rangeIndex++)
    {
        var range = new { Value = rangeIndex };
        web.Add(new Linode.Instance($"web-{range.Value}", new Linode.InstanceArgs
        {
            AuthorizedKeys = 
            {
                "ssh-rsa AAAA...Gw== user@example.local",
            },
            Image = "linode/ubuntu18.04",
            Label = $"web-{range.Value + 1}",
            PrivateIp = true,
            Region = "us-east",
            RootPass = "test",
            Type = "g6-standard-1",
        }));
    }
    var foobar = new Linode.NodeBalancer("foobar", new Linode.NodeBalancerArgs
    {
        ClientConnThrottle = 20,
        Label = "mynodebalancer",
        Region = "us-east",
    });
    var foofig = new Linode.NodeBalancerConfig("foofig", new Linode.NodeBalancerConfigArgs
    {
        Algorithm = "source",
        Check = "http",
        CheckAttempts = 3,
        CheckPath = "/foo",
        CheckTimeout = 30,
        NodebalancerId = foobar.Id,
        Port = 80,
        Protocol = "http",
        Stickiness = "http_cookie",
    });
    var foonode = new List<Linode.NodeBalancerNode>();
    for (var rangeIndex = 0; rangeIndex < 3; rangeIndex++)
    {
        var range = new { Value = rangeIndex };
        foonode.Add(new Linode.NodeBalancerNode($"foonode-{range.Value}", new Linode.NodeBalancerNodeArgs
        {
            Address = web.Select(__item => __item.PrivateIpAddress).ToList()[range.Value].Apply(privateIpAddresses => $"{privateIpAddresses}:80"),
            ConfigId = foofig.Id,
            Label = "mynodebalancernode",
            NodebalancerId = foobar.Id,
            Weight = 50,
        }));
    }
}

}

Attributes

This resource exports the following attributes:

  • status - The current status of this node, based on the configured checks of its NodeBalancer Config. (unknown, UP, DOWN).

  • config_id - The ID of the NodeBalancerConfig this NodeBalancerNode is attached to.

  • nodebalancer_id - The ID of the NodeBalancer this NodeBalancerNode is attached to.

Inheritance
System.Object
Resource
CustomResource
NodeBalancerNode
Inherited Members
CustomResource.Id
Resource.GetResourceType()
Resource.GetResourceName()
Resource.Urn
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.Linode
Assembly: Pulumi.Linode.dll
Syntax
public class NodeBalancerNode : CustomResource

Constructors

View Source

NodeBalancerNode(String, NodeBalancerNodeArgs, CustomResourceOptions)

Create a NodeBalancerNode resource with the given unique name, arguments, and options.

Declaration
public NodeBalancerNode(string name, NodeBalancerNodeArgs args, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resource

NodeBalancerNodeArgs args

The arguments used to populate this resource's properties

CustomResourceOptions options

A bag of options that control this resource's behavior

Properties

View Source

Address

The private IP Address where this backend can be reached. This must be a private IP address.

Declaration
public Output<string> Address { get; }
Property Value
Type Description
Output<System.String>
View Source

ConfigId

The ID of the NodeBalancerConfig to access.

Declaration
public Output<int> ConfigId { get; }
Property Value
Type Description
Output<System.Int32>
View Source

Label

The label of the Linode NodeBalancer Node. This is for display purposes only.

Declaration
public Output<string> Label { get; }
Property Value
Type Description
Output<System.String>
View Source

Mode

The mode this NodeBalancer should use when sending traffic to this backend. If set to accept this backend is accepting traffic. If set to reject this backend will not receive traffic. If set to drain this backend will not receive new traffic, but connections already pinned to it will continue to be routed to it

Declaration
public Output<string> Mode { get; }
Property Value
Type Description
Output<System.String>
View Source

NodebalancerId

The ID of the NodeBalancer to access.

Declaration
public Output<int> NodebalancerId { get; }
Property Value
Type Description
Output<System.Int32>
View Source

Status

The current status of this node, based on the configured checks of its NodeBalancer Config. (unknown, UP, DOWN)

Declaration
public Output<string> Status { get; }
Property Value
Type Description
Output<System.String>
View Source

Weight

Used when picking a backend to serve a request and is not pinned to a single backend yet. Nodes with a higher weight will receive more traffic. (1-255).

Declaration
public Output<int> Weight { get; }
Property Value
Type Description
Output<System.Int32>

Methods

View Source

Get(String, Input<String>, NodeBalancerNodeState, CustomResourceOptions)

Get an existing NodeBalancerNode resource's state with the given name, ID, and optional extra properties used to qualify the lookup.

Declaration
public static NodeBalancerNode Get(string name, Input<string> id, NodeBalancerNodeState state = null, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resulting resource.

Input<System.String> id

The unique provider ID of the resource to lookup.

NodeBalancerNodeState state

Any extra arguments used during the lookup.

CustomResourceOptions options

A bag of options that control this resource's behavior

Returns
Type Description
NodeBalancerNode
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.