Instance

Provides a Lightsail Instance. Amazon Lightsail is a service to provide easy virtual private servers with custom software already setup. See What is Amazon Lightsail? for more information.

Note: Lightsail is currently only supported in a limited number of AWS Regions, please see “Regions and Availability Zones in Amazon Lightsail” for more details

Availability Zones

Lightsail currently supports the following Availability Zones (e.g. us-east-1a):

  • ap-northeast-1{a,c,d}
  • ap-northeast-2{a,c}
  • ap-south-1{a,b}
  • ap-southeast-1{a,b,c}
  • ap-southeast-2{a,b,c}
  • ca-central-1{a,b}
  • eu-central-1{a,b,c}
  • eu-west-1{a,b,c}
  • eu-west-2{a,b,c}
  • eu-west-3{a,b,c}
  • us-east-1{a,b,c,d,e,f}
  • us-east-2{a,b,c}
  • us-west-2{a,b,c}

Blueprints

Lightsail currently supports the following Blueprint IDs:

OS Only

  • amazon_linux_2018_03_0_2
  • centos_7_1901_01
  • debian_8_7
  • debian_9_5
  • freebsd_11_1
  • opensuse_42_2
  • ubuntu_16_04_2
  • ubuntu_18_04

Apps and OS

  • drupal_8_5_6
  • gitlab_11_1_4_1
  • joomla_3_8_11
  • lamp_5_6_37_2
  • lamp_7_1_20_1
  • magento_2_2_5
  • mean_4_0_1
  • nginx_1_14_0_1
  • nodejs_10_8_0
  • plesk_ubuntu_17_8_11_1
  • redmine_3_4_6
  • wordpress_4_9_8
  • wordpress_multisite_4_9_8

Bundles

Lightsail currently supports the following Bundle IDs (e.g. an instance in ap-northeast-1 would use small_2_0):

Prefix

A Bundle ID starts with one of the below size prefixes:

  • nano_
  • micro_
  • small_
  • medium_
  • large_
  • xlarge_
  • 2xlarge_

Suffix

A Bundle ID ends with one of the following suffixes depending on Availability Zone:

  • ap-northeast-1: 2_0
  • ap-northeast-2: 2_0
  • ap-south-1: 2_1
  • ap-southeast-1: 2_0
  • ap-southeast-2: 2_2
  • ca-central-1: 2_0
  • eu-central-1: 2_0
  • eu-west-1: 2_0
  • eu-west-2: 2_0
  • eu-west-3: 2_0
  • us-east-1: 2_0
  • us-east-2: 2_0
  • us-west-2: 2_0

Example Usage

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        // Create a new GitLab Lightsail Instance
        var gitlabTest = new Aws.LightSail.Instance("gitlabTest", new Aws.LightSail.InstanceArgs
        {
            AvailabilityZone = "us-east-1b",
            BlueprintId = "string",
            BundleId = "string",
            KeyPairName = "some_key_name",
            Tags = 
            {
                { "foo", "bar" },
            },
        });
    }

}
package main

import (
    "github.com/pulumi/pulumi-aws/sdk/v2/go/aws/lightsail"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        _, err := lightsail.NewInstance(ctx, "gitlabTest", &lightsail.InstanceArgs{
            AvailabilityZone: pulumi.String("us-east-1b"),
            BlueprintId:      pulumi.String("string"),
            BundleId:         pulumi.String("string"),
            KeyPairName:      pulumi.String("some_key_name"),
            Tags: pulumi.StringMap{
                "foo": pulumi.String("bar"),
            },
        })
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_aws as aws

# Create a new GitLab Lightsail Instance
gitlab_test = aws.lightsail.Instance("gitlabTest",
    availability_zone="us-east-1b",
    blueprint_id="string",
    bundle_id="string",
    key_pair_name="some_key_name",
    tags={
        "foo": "bar",
    })
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

// Create a new GitLab Lightsail Instance
const gitlabTest = new aws.lightsail.Instance("gitlab_test", {
    availabilityZone: "us-east-1b",
    blueprintId: "string",
    bundleId: "string",
    keyPairName: "some_key_name",
    tags: {
        foo: "bar",
    },
});

Create a Instance Resource

def Instance(resource_name, opts=None, availability_zone=None, blueprint_id=None, bundle_id=None, key_pair_name=None, name=None, tags=None, user_data=None, __props__=None);
func NewInstance(ctx *Context, name string, args InstanceArgs, opts ...ResourceOption) (*Instance, error)
public Instance(string name, InstanceArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args InstanceArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args InstanceArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args InstanceArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

Instance Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The Instance resource accepts the following input properties:

AvailabilityZone string

The Availability Zone in which to create your instance (see list below)

BlueprintId string

The ID for a virtual private server image (see list below)

BundleId string

The bundle of specification information (see list below)

KeyPairName string

The name of your key pair. Created in the Lightsail console (cannot use aws.ec2.KeyPair at this time)

Name string

The name of the Lightsail Instance. Names be unique within each AWS Region in your Lightsail account.

Tags Dictionary<string, string>

A map of tags to assign to the resource.

UserData string

launch script to configure server with additional user data

AvailabilityZone string

The Availability Zone in which to create your instance (see list below)

BlueprintId string

The ID for a virtual private server image (see list below)

BundleId string

The bundle of specification information (see list below)

KeyPairName string

The name of your key pair. Created in the Lightsail console (cannot use aws.ec2.KeyPair at this time)

Name string

The name of the Lightsail Instance. Names be unique within each AWS Region in your Lightsail account.

Tags map[string]string

A map of tags to assign to the resource.

UserData string

launch script to configure server with additional user data

availabilityZone string

The Availability Zone in which to create your instance (see list below)

blueprintId string

The ID for a virtual private server image (see list below)

bundleId string

The bundle of specification information (see list below)

keyPairName string

The name of your key pair. Created in the Lightsail console (cannot use aws.ec2.KeyPair at this time)

name string

The name of the Lightsail Instance. Names be unique within each AWS Region in your Lightsail account.

tags {[key: string]: string}

A map of tags to assign to the resource.

userData string

launch script to configure server with additional user data

availability_zone str

The Availability Zone in which to create your instance (see list below)

blueprint_id str

The ID for a virtual private server image (see list below)

bundle_id str

The bundle of specification information (see list below)

key_pair_name str

The name of your key pair. Created in the Lightsail console (cannot use aws.ec2.KeyPair at this time)

name str

The name of the Lightsail Instance. Names be unique within each AWS Region in your Lightsail account.

tags Dict[str, str]

A map of tags to assign to the resource.

user_data str

launch script to configure server with additional user data

Outputs

All input properties are implicitly available as output properties. Additionally, the Instance resource produces the following output properties:

Arn string

The ARN of the Lightsail instance (matches id).

CpuCount int
CreatedAt string

The timestamp when the instance was created. * availability_zone * blueprint_id * bundle_id * key_pair_name * user_data

Id string
The provider-assigned unique ID for this managed resource.
Ipv6Address string
IsStaticIp bool
PrivateIpAddress string
PublicIpAddress string
RamSize double
Username string
Arn string

The ARN of the Lightsail instance (matches id).

CpuCount int
CreatedAt string

The timestamp when the instance was created. * availability_zone * blueprint_id * bundle_id * key_pair_name * user_data

Id string
The provider-assigned unique ID for this managed resource.
Ipv6Address string
IsStaticIp bool
PrivateIpAddress string
PublicIpAddress string
RamSize float64
Username string
arn string

The ARN of the Lightsail instance (matches id).

cpuCount number
createdAt string

The timestamp when the instance was created. * availability_zone * blueprint_id * bundle_id * key_pair_name * user_data

id string
The provider-assigned unique ID for this managed resource.
ipv6Address string
isStaticIp boolean
privateIpAddress string
publicIpAddress string
ramSize number
username string
arn str

The ARN of the Lightsail instance (matches id).

cpu_count float
created_at str

The timestamp when the instance was created. * availability_zone * blueprint_id * bundle_id * key_pair_name * user_data

id str
The provider-assigned unique ID for this managed resource.
ipv6_address str
is_static_ip bool
private_ip_address str
public_ip_address str
ram_size float
username str

Look up an Existing Instance Resource

Get an existing Instance 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?: InstanceState, opts?: CustomResourceOptions): Instance
static get(resource_name, id, opts=None, arn=None, availability_zone=None, blueprint_id=None, bundle_id=None, cpu_count=None, created_at=None, ipv6_address=None, is_static_ip=None, key_pair_name=None, name=None, private_ip_address=None, public_ip_address=None, ram_size=None, tags=None, user_data=None, username=None, __props__=None);
func GetInstance(ctx *Context, name string, id IDInput, state *InstanceState, opts ...ResourceOption) (*Instance, error)
public static Instance Get(string name, Input<string> id, InstanceState? state, CustomResourceOptions? opts = null)
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.

The following state arguments are supported:

Arn string

The ARN of the Lightsail instance (matches id).

AvailabilityZone string

The Availability Zone in which to create your instance (see list below)

BlueprintId string

The ID for a virtual private server image (see list below)

BundleId string

The bundle of specification information (see list below)

CpuCount int
CreatedAt string

The timestamp when the instance was created. * availability_zone * blueprint_id * bundle_id * key_pair_name * user_data

Ipv6Address string
IsStaticIp bool
KeyPairName string

The name of your key pair. Created in the Lightsail console (cannot use aws.ec2.KeyPair at this time)

Name string

The name of the Lightsail Instance. Names be unique within each AWS Region in your Lightsail account.

PrivateIpAddress string
PublicIpAddress string
RamSize double
Tags Dictionary<string, string>

A map of tags to assign to the resource.

UserData string

launch script to configure server with additional user data

Username string
Arn string

The ARN of the Lightsail instance (matches id).

AvailabilityZone string

The Availability Zone in which to create your instance (see list below)

BlueprintId string

The ID for a virtual private server image (see list below)

BundleId string

The bundle of specification information (see list below)

CpuCount int
CreatedAt string

The timestamp when the instance was created. * availability_zone * blueprint_id * bundle_id * key_pair_name * user_data

Ipv6Address string
IsStaticIp bool
KeyPairName string

The name of your key pair. Created in the Lightsail console (cannot use aws.ec2.KeyPair at this time)

Name string

The name of the Lightsail Instance. Names be unique within each AWS Region in your Lightsail account.

PrivateIpAddress string
PublicIpAddress string
RamSize float64
Tags map[string]string

A map of tags to assign to the resource.

UserData string

launch script to configure server with additional user data

Username string
arn string

The ARN of the Lightsail instance (matches id).

availabilityZone string

The Availability Zone in which to create your instance (see list below)

blueprintId string

The ID for a virtual private server image (see list below)

bundleId string

The bundle of specification information (see list below)

cpuCount number
createdAt string

The timestamp when the instance was created. * availability_zone * blueprint_id * bundle_id * key_pair_name * user_data

ipv6Address string
isStaticIp boolean
keyPairName string

The name of your key pair. Created in the Lightsail console (cannot use aws.ec2.KeyPair at this time)

name string

The name of the Lightsail Instance. Names be unique within each AWS Region in your Lightsail account.

privateIpAddress string
publicIpAddress string
ramSize number
tags {[key: string]: string}

A map of tags to assign to the resource.

userData string

launch script to configure server with additional user data

username string
arn str

The ARN of the Lightsail instance (matches id).

availability_zone str

The Availability Zone in which to create your instance (see list below)

blueprint_id str

The ID for a virtual private server image (see list below)

bundle_id str

The bundle of specification information (see list below)

cpu_count float
created_at str

The timestamp when the instance was created. * availability_zone * blueprint_id * bundle_id * key_pair_name * user_data

ipv6_address str
is_static_ip bool
key_pair_name str

The name of your key pair. Created in the Lightsail console (cannot use aws.ec2.KeyPair at this time)

name str

The name of the Lightsail Instance. Names be unique within each AWS Region in your Lightsail account.

private_ip_address str
public_ip_address str
ram_size float
tags Dict[str, str]

A map of tags to assign to the resource.

user_data str

launch script to configure server with additional user data

username str

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.