Show / Hide Table of Contents

Namespace Pulumi.Linode

Classes

Config

Domain

Provides a Linode Domain resource. This can be used to create, modify, and delete Linode Domains through Linode's managed DNS service. For more information, see DNS Manager and the Linode APIv4 docs.

Example Usage

using Pulumi;
using Linode = Pulumi.Linode;

class MyStack : Stack
{
public MyStack()
{
    var foobarDomain = new Linode.Domain("foobarDomain", new Linode.DomainArgs
    {
        Domain = "foobar.example",
        SoaEmail = "example@foobar.example",
        Tags = 
        {
            "foo",
            "bar",
        },
        Type = "master",
    });
    var foobarDomainRecord = new Linode.DomainRecord("foobarDomainRecord", new Linode.DomainRecordArgs
    {
        DomainId = foobarDomain.Id,
        Name = "www",
        RecordType = "CNAME",
        Target = "foobar.example",
    });
}

}

Attributes

This resource exports no additional attributes, however status may reflect degraded states.

DomainArgs

DomainRecord

Provides a Linode Domain Record resource. This can be used to create, modify, and delete Linodes Domain Records. For more information, see DNS Manager and the Linode APIv4 docs.

Example Usage

using Pulumi;
using Linode = Pulumi.Linode;

class MyStack : Stack
{
public MyStack()
{
    var foobarDomain = new Linode.Domain("foobarDomain", new Linode.DomainArgs
    {
        Domain = "foobar.example",
        SoaEmail = "example@foobar.example",
        Type = "master",
    });
    var foobarDomainRecord = new Linode.DomainRecord("foobarDomainRecord", new Linode.DomainRecordArgs
    {
        DomainId = foobarDomain.Id,
        Name = "www",
        RecordType = "CNAME",
        Target = "foobar.example",
    });
}

}

Attributes

This resource exports no additional attributes.

DomainRecordArgs

DomainRecordState

DomainState

Firewall

NOTICE: The Firewall feature is currently available through early access.

Manages a Linode Firewall.

FirewallArgs

FirewallState

GetAccount

GetAccountResult

GetDomain

GetDomainArgs

GetDomainRecord

GetDomainRecordArgs

GetDomainRecordResult

GetDomainResult

GetImage

GetImageArgs

GetImageResult

GetInstanceType

GetInstanceTypeArgs

GetInstanceTypeResult

GetNetworkingIp

GetNetworkingIpArgs

GetNetworkingIpResult

GetObjectStorageCluster

GetObjectStorageClusterArgs

GetObjectStorageClusterResult

GetProfile

GetProfileResult

GetRegion

GetRegionArgs

GetRegionResult

GetSshKey

GetSshKeyArgs

GetSshKeyResult

GetStackScript

GetStackScriptArgs

GetStackScriptResult

GetUser

GetUserArgs

GetUserResult

GetVolume

GetVolumeArgs

GetVolumeResult

Image

Provides a Linode Image resource. This can be used to create, modify, and delete Linodes Images. Linode Images are snapshots of a Linode Instance Disk which can then be used to provision more Linode Instances. Images can be used across regions.

For more information, see Linode's documentation on Images and the Linode APIv4 docs.

Example Usage

using Pulumi;
using Linode = Pulumi.Linode;

class MyStack : Stack
{
public MyStack()
{
    var foo = new Linode.Instance("foo", new Linode.InstanceArgs
    {
        Region = "us-central",
        Type = "g6-nanode-1",
    });
    var bar = new Linode.Image("bar", new Linode.ImageArgs
    {
        Description = "Image taken from foo",
        DiskId = foo.Disks.Apply(disks => disks[0].Id),
        Label = "foo-sda-image",
        LinodeId = foo.Id,
    });
    var barBased = new Linode.Instance("barBased", new Linode.InstanceArgs
    {
        Image = bar.Id,
        Region = "eu-west",
        Type = foo.Type,
    });
}

}

Attributes

This resource exports the following attributes:

  • id - The unique ID of this Image. The ID of private images begin with private/ followed by the numeric identifier of the private image, for example private/12345.

  • created - When this Image was created.

  • created_by - The name of the User who created this Image.

  • deprecated - Whether or not this Image is deprecated. Will only be True for deprecated public Images.

  • is_public - True if the Image is public.

  • size - The minimum size this Image needs to deploy. Size is in MB.

  • type - How the Image was created. 'Manual' Images can be created at any time. 'Automatic' images are created automatically from a deleted Linode.

  • expiry - Only Images created automatically (from a deleted Linode; type=automatic) will expire.

  • vendor - The upstream distribution vendor. Nil for private Images.

ImageArgs

ImageState

Instance

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

Example Usage

Simple Linode Instance

using Pulumi;
using Linode = Pulumi.Linode;

class MyStack : Stack
{
public MyStack()
{
    var web = new Linode.Instance("web", new Linode.InstanceArgs
    {
        AuthorizedKeys = 
        {
            "ssh-rsa AAAA...Gw== user@example.local",
        },
        Group = "foo",
        Image = "linode/ubuntu18.04",
        Label = "simple_instance",
        PrivateIp = true,
        Region = "us-central",
        RootPass = "terr4form-test",
        SwapSize = 256,
        Tags = 
        {
            "foo",
        },
        Type = "g6-standard-1",
    });
}

}

Linode Instance with explicit Configs and Disks

using Pulumi;
using Linode = Pulumi.Linode;

class MyStack : Stack
{
public MyStack()
{
    var me = Output.Create(Linode.GetProfile.InvokeAsync());
    var webVolume = new Linode.Volume("webVolume", new Linode.VolumeArgs
    {
        Label = "web_volume",
        Region = "us-central",
        Size = 20,
    });
    var web = new Linode.Instance("web", new Linode.InstanceArgs
    {
        BootConfigLabel = "boot_config",
        Configs = 
        {
            new Linode.Inputs.InstanceConfigArgs
            {
                Devices = new Linode.Inputs.InstanceConfigDevicesArgs
                {
                    Sda = new Linode.Inputs.InstanceConfigDevicesSdaArgs
                    {
                        DiskLabel = "boot",
                    },
                    Sdb = new Linode.Inputs.InstanceConfigDevicesSdbArgs
                    {
                        VolumeId = webVolume.Id,
                    },
                },
                Kernel = "linode/latest-64bit",
                Label = "boot_config",
                RootDevice = "/dev/sda",
            },
        },
        Disks = 
        {
            new Linode.Inputs.InstanceDiskArgs
            {
                AuthorizedKeys = 
                {
                    "ssh-rsa AAAA...Gw== user@example.local",
                },
                AuthorizedUsers = 
                {
                    me.Apply(me => me.Username),
                },
                Image = "linode/ubuntu18.04",
                Label = "boot",
                RootPass = "terr4form-test",
                Size = 3000,
            },
        },
        Group = "foo",
        Label = "complex_instance",
        PrivateIp = true,
        Region = "us-central",
        Tags = 
        {
            "foo",
        },
        Type = "g6-nanode-1",
    });
}

}

Attributes

This Linode Instance resource exports the following attributes:

  • status - The status of the instance, indicating the current readiness state. (running, offline, ...)

  • ip_address - A string containing the Linode's public IP address.

  • private_ip_address - This Linode's Private IPv4 Address, if enabled. The regional private IP address range, 192.168.128.0/17, is shared by all Linode Instances in a region.

  • ipv6 - This Linode's IPv6 SLAAC addresses. This address is specific to a Linode, and may not be shared. The prefix (/64) is included in this attribute.

  • ipv4 - This Linode's IPv4 Addresses. Each Linode is assigned a single public IPv4 address upon creation, and may get a single private IPv4 address if needed. You may need to open a support ticket to get additional IPv4 addresses.

  • specs.0.disk - The amount of storage space, in GB. this Linode has access to. A typical Linode will divide this space between a primary disk with an image deployed to it, and a swap disk, usually 512 MB. This is the default configuration created when deploying a Linode with an image through POST /linode/instances.

  • specs.0.memory - The amount of RAM, in MB, this Linode has access to. Typically a Linode will choose to boot with all of its available RAM, but this can be configured in a Config profile.

  • specs.0.vcpus - The number of vcpus this Linode has access to. Typically a Linode will choose to boot with all of its available vcpus, but this can be configured in a Config Profile.

  • specs.0.transfer - The amount of network transfer this Linode is allotted each month.

  • backups - Information about this Linode's backups status.

  • enabled - If this Linode has the Backup service enabled.

  • schedule

  • day - The day of the week that your Linode's weekly Backup is taken. If not set manually, a day will be chosen for you. Backups are taken every day, but backups taken on this day are preferred when selecting backups to retain for a longer period. If not set manually, then when backups are initially enabled, this may come back as "Scheduling" until the day is automatically selected.

  • window - The window ('W0'-'W22') in which your backups will be taken, in UTC. A backups window is a two-hour span of time in which the backup may occur. For example, 'W10' indicates that your backups should be taken between 10:00 and 12:00. If you do not choose a backup window, one will be selected for you automatically. If not set manually, when backups are initially enabled this may come back as Scheduling until the window is automatically selected.

InstanceArgs

InstanceState

LkeCluster

Manages an LKE cluster.

Example Usage

using Pulumi;
using Linode = Pulumi.Linode;

class MyStack : Stack
{
public MyStack()
{
    var my_cluster = new Linode.LkeCluster("my-cluster", new Linode.LkeClusterArgs
    {
        K8sVersion = "1.17",
        Label = "my-cluster",
        Pools = 
        {
            new Linode.Inputs.LkeClusterPoolArgs
            {
                Count = 3,
                Type = "g6-standard-2",
            },
        },
        Region = "us-central",
        Tags = 
        {
            "prod",
        },
    });
}

}

LkeClusterArgs

LkeClusterState

NodeBalancer

Provides a Linode NodeBalancer resource. This can be used to create, modify, and delete Linodes NodeBalancers in Linode's managed load balancer service. For more information, see Getting Started with NodeBalancers and the Linode APIv4 docs.

Example Usage

using Pulumi;
using Linode = Pulumi.Linode;

class MyStack : Stack
{
public MyStack()
{
    var foobar = new Linode.NodeBalancer("foobar", new Linode.NodeBalancerArgs
    {
        ClientConnThrottle = 20,
        Label = "mynodebalancer",
        Region = "us-east",
        Tags = 
        {
            "foobar",
        },
    });
}

}

Attributes

This resource exports the following attributes:

  • hostname - This NodeBalancer's hostname, ending with .nodebalancer.linode.com

  • ipv4 - The Public IPv4 Address of this NodeBalancer

  • ipv6 - The Public IPv6 Address of this NodeBalancer

NodeBalancerArgs

NodeBalancerConfig

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

Example Usage

using Pulumi;
using Linode = Pulumi.Linode;

class MyStack : Stack
{
public MyStack()
{
    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 = 8088,
        Protocol = "http",
        Stickiness = "http_cookie",
    });
}

}

Attributes

This resource exports the following attributes:

  • ssl_commonname - The common name for the SSL certification this port is serving if this port is not configured to use SSL.

  • ssl_fingerprint - The fingerprint for the SSL certification this port is serving if this port is not configured to use SSL.

  • node_status_up - The number of backends considered to be 'UP' and healthy, and that are serving requests.

  • node_status_down - The number of backends considered to be 'DOWN' and unhealthy. These are not in rotation, and not serving requests.

NodeBalancerConfigArgs

NodeBalancerConfigState

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.

NodeBalancerNodeArgs

NodeBalancerNodeState

NodeBalancerState

ObjectStorageBucket

Provides a Linode Object Storage Bucket resource. This can be used to create, modify, and delete Linodes Object Storage Buckets.

Example Usage

using Pulumi;
using Linode = Pulumi.Linode;

class MyStack : Stack
{
public MyStack()
{
    var primary = Output.Create(Linode.GetObjectStorageCluster.InvokeAsync(new Linode.GetObjectStorageClusterArgs
    {
        Id = "us-east-1",
    }));
    var foobar = new Linode.ObjectStorageBucket("foobar", new Linode.ObjectStorageBucketArgs
    {
        Cluster = primary.Apply(primary => primary.Id),
        Label = "%s",
    });
}

}

ObjectStorageBucketArgs

ObjectStorageBucketState

ObjectStorageKey

Provides a Linode Object Storage Key resource. This can be used to create, modify, and delete Linodes Object Storage Keys.

Example Usage

using Pulumi;
using Linode = Pulumi.Linode;

class MyStack : Stack
{
public MyStack()
{
    var foo = new Linode.ObjectStorageKey("foo", new Linode.ObjectStorageKeyArgs
    {
        Label = "image-access",
    });
}

}

Attributes

This resource exports the following attributes:

  • access_key - This keypair's access key. This is not secret.

  • secret_key - This keypair's secret key.

ObjectStorageKeyArgs

ObjectStorageKeyState

Provider

The provider type for the linode package. By default, resources use package-wide configuration settings, however an explicit Provider instance may be created and passed during resource construction to achieve fine-grained programmatic control over provider settings. See the documentation for more information.

ProviderArgs

Rdns

Provides a Linode RDNS resource. This can be used to create and modify RDNS records.

Linode RDNS names must have a matching address value in an A or AAAA record. This A or AAAA name must be resolvable at the time the RDNS resource is being associated.

For more information, see the Linode APIv4 docs and the Configure your Linode for Reverse DNS guide.

RdnsArgs

RdnsState

SshKey

Provides a Linode SSH Key resource. This can be used to create, modify, and delete Linodes SSH Keys. Managed SSH Keys allow instances to be created with a list of Linode usernames, whose SSH keys will be automatically applied to the root account's ~/.ssh/authorized_keys file. For more information, see the Linode APIv4 docs.

Attributes

This resource exports the following attributes:

  • created - The date this SSH Key was created.

SshKeyArgs

SshKeyState

StackScript

Provides a Linode StackScript resource. This can be used to create, modify, and delete Linode StackScripts. StackScripts are private or public managed scripts which run within an instance during startup. StackScripts can include variables whose values are specified when the Instance is created.

For more information, see Automate Deployment with StackScripts and the Linode APIv4 docs.

Example Usage

using Pulumi;
using Linode = Pulumi.Linode;

class MyStack : Stack
{
public MyStack()
{
    var fooStackScript = new Linode.StackScript("fooStackScript", new Linode.StackScriptArgs
    {
        Description = "Installs a Package",
        Images = 
        {
            "linode/ubuntu18.04",
            "linode/ubuntu16.04lts",
        },
        Label = "foo",
        RevNote = "initial version",
        Script = @"#!/bin/bash
# <UDF name=""package"" label=""System Package to Install"" example=""nginx"" default="""">
apt-get -q update && apt-get -q -y install $$PACKAGE

",
    });
    var fooInstance = new Linode.Instance("fooInstance", new Linode.InstanceArgs
    {
        AuthorizedKeys = 
        {
            "...",
        },
        Image = "linode/ubuntu18.04",
        Label = "foo",
        Region = "us-east",
        RootPass = "...",
        StackscriptData = 
        {
            { "package", "nginx" },
        },
        StackscriptId = linode_stackscript.Install_nginx.Id,
        Type = "g6-nanode-1",
    });
}

}

Attributes

This resource exports the following attributes:

  • deployments_active - Count of currently active, deployed Linodes created from this StackScript.

  • user_gravatar_id - The Gravatar ID for the User who created the StackScript.

  • deployments_total - The total number of times this StackScript has been deployed.

  • username - The User who created the StackScript.

  • created - The date this StackScript was created.

  • updated - The date this StackScript was updated.

  • user_defined_fields - This is a list of fields defined with a special syntax inside this StackScript that allow for supplying customized parameters during deployment.

  • label - A human-readable label for the field that will serve as the input prompt for entering the value during deployment.

  • name - The name of the field.

  • example - An example value for the field.

  • one_of - A list of acceptable single values for the field.

  • many_of - A list of acceptable values for the field in any quantity, combination or order.

  • default - The default value. If not specified, this value will be used.

StackScriptArgs

StackScriptState

Token

Provides a Linode Token resource. This can be used to create, modify, and delete Linode API Personal Access Tokens. Personal Access Tokens proxy user credentials for Linode API access. This is necessary for tools, to interact with Linode services on a user's behalf.

It is common for the provider itself to be configured with broadly scoped Personal Access Tokens. Provisioning scripts or tools configured within a Linode Instance should follow the principle of least privilege to afford only the required roles for tools to perform their necessary tasks. The linode..Token resource allows for the management of Personal Access Tokens with scopes mirroring or narrowing the scope of the parent token.

For more information, see the Linode APIv4 docs.

Example Usage

using Pulumi;
using Linode = Pulumi.Linode;

class MyStack : Stack
{
public MyStack()
{
    var fooToken = new Linode.Token("fooToken", new Linode.TokenArgs
    {
        Expiry = "2100-01-02T03:04:05Z",
        Label = "token",
        Scopes = "linodes:read_only",
    });
    var fooInstance = new Linode.Instance("fooInstance", new Linode.InstanceArgs
    {
    });
}

}

Attributes

This resource exports the following attributes:

  • token - The token used to access the API.

  • created - The date this Token was created.

TokenArgs

TokenState

Volume

Provides a Linode Volume resource. This can be used to create, modify, and delete Linodes Block Storage Volumes. Block Storage Volumes are removable storage disks that persist outside the life-cycle of Linode Instances. These volumes can be attached to and detached from Linode instances throughout a region.

For more information, see How to Use Block Storage with Your Linode and the Linode APIv4 docs.

Example Usage

using Pulumi;
using Linode = Pulumi.Linode;

class MyStack : Stack
{
public MyStack()
{
    var foobaz = new Linode.Instance("foobaz", new Linode.InstanceArgs
    {
        Region = "us-west",
        RootPass = "3X4mp13",
        Tags = 
        {
            "foobaz",
        },
        Type = "g6-nanode-1",
    });
    var foobar = new Linode.Volume("foobar", new Linode.VolumeArgs
    {
        Label = "foo-volume",
        LinodeId = foobaz.Id,
        Region = foobaz.Region,
    });
}

}

Attributes

This resource exports the following attributes:

  • status - The label of the Linode Volume.

  • filesystem_path - The full filesystem path for the Volume based on the Volume's label. The path is "/dev/disk/by-id/scsi-0Linode_Volume_" + the Volume label

VolumeArgs

VolumeState

Back to top Copyright 2016-2020, Pulumi Corporation.