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_2centos_7_1901_01debian_8_7debian_9_5freebsd_11_1opensuse_42_2ubuntu_16_04_2ubuntu_18_04
Apps and OS
drupal_8_5_6gitlab_11_1_4_1joomla_3_8_11lamp_5_6_37_2lamp_7_1_20_1magento_2_2_5mean_4_0_1nginx_1_14_0_1nodejs_10_8_0plesk_ubuntu_17_8_11_1redmine_3_4_6wordpress_4_9_8wordpress_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
new Instance(name: string, args: InstanceArgs, opts?: CustomResourceOptions);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:
- Availability
Zone string The Availability Zone in which to create your instance (see list below)
- Blueprint
Id string The ID for a virtual private server image (see list below)
- Bundle
Id string The bundle of specification information (see list below)
- Key
Pair stringName The name of your key pair. Created in the Lightsail console (cannot use
aws.ec2.KeyPairat this time)- Name string
The name of the Lightsail Instance. Names be unique within each AWS Region in your Lightsail account.
- Dictionary<string, string>
A map of tags to assign to the resource.
- User
Data string launch script to configure server with additional user data
- Availability
Zone string The Availability Zone in which to create your instance (see list below)
- Blueprint
Id string The ID for a virtual private server image (see list below)
- Bundle
Id string The bundle of specification information (see list below)
- Key
Pair stringName The name of your key pair. Created in the Lightsail console (cannot use
aws.ec2.KeyPairat this time)- Name string
The name of the Lightsail Instance. Names be unique within each AWS Region in your Lightsail account.
- map[string]string
A map of tags to assign to the resource.
- User
Data string launch script to configure server with additional user data
- availability
Zone string The Availability Zone in which to create your instance (see list below)
- blueprint
Id string The ID for a virtual private server image (see list below)
- bundle
Id string The bundle of specification information (see list below)
- key
Pair stringName The name of your key pair. Created in the Lightsail console (cannot use
aws.ec2.KeyPairat this time)- name string
The name of the Lightsail Instance. Names be unique within each AWS Region in your Lightsail account.
- {[key: string]: string}
A map of tags to assign to the resource.
- user
Data 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_ strname The name of your key pair. Created in the Lightsail console (cannot use
aws.ec2.KeyPairat this time)- name str
The name of the Lightsail Instance. Names be unique within each AWS Region in your Lightsail account.
- 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).- Cpu
Count int - Created
At 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
- Is
Static boolIp - Private
Ip stringAddress - Public
Ip stringAddress - Ram
Size double - Username string
- Arn string
The ARN of the Lightsail instance (matches
id).- Cpu
Count int - Created
At 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
- Is
Static boolIp - Private
Ip stringAddress - Public
Ip stringAddress - Ram
Size float64 - Username string
- arn string
The ARN of the Lightsail instance (matches
id).- cpu
Count number - created
At 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
- is
Static booleanIp - private
Ip stringAddress - public
Ip stringAddress - ram
Size 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_ boolip - private_
ip_ straddress - public_
ip_ straddress - 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): Instancestatic 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).- Availability
Zone string The Availability Zone in which to create your instance (see list below)
- Blueprint
Id string The ID for a virtual private server image (see list below)
- Bundle
Id string The bundle of specification information (see list below)
- Cpu
Count int - Created
At string The timestamp when the instance was created. *
availability_zone*blueprint_id*bundle_id*key_pair_name*user_data- Ipv6Address string
- Is
Static boolIp - Key
Pair stringName The name of your key pair. Created in the Lightsail console (cannot use
aws.ec2.KeyPairat this time)- Name string
The name of the Lightsail Instance. Names be unique within each AWS Region in your Lightsail account.
- Private
Ip stringAddress - Public
Ip stringAddress - Ram
Size double - Dictionary<string, string>
A map of tags to assign to the resource.
- User
Data string launch script to configure server with additional user data
- Username string
- Arn string
The ARN of the Lightsail instance (matches
id).- Availability
Zone string The Availability Zone in which to create your instance (see list below)
- Blueprint
Id string The ID for a virtual private server image (see list below)
- Bundle
Id string The bundle of specification information (see list below)
- Cpu
Count int - Created
At string The timestamp when the instance was created. *
availability_zone*blueprint_id*bundle_id*key_pair_name*user_data- Ipv6Address string
- Is
Static boolIp - Key
Pair stringName The name of your key pair. Created in the Lightsail console (cannot use
aws.ec2.KeyPairat this time)- Name string
The name of the Lightsail Instance. Names be unique within each AWS Region in your Lightsail account.
- Private
Ip stringAddress - Public
Ip stringAddress - Ram
Size float64 - map[string]string
A map of tags to assign to the resource.
- User
Data string launch script to configure server with additional user data
- Username string
- arn string
The ARN of the Lightsail instance (matches
id).- availability
Zone string The Availability Zone in which to create your instance (see list below)
- blueprint
Id string The ID for a virtual private server image (see list below)
- bundle
Id string The bundle of specification information (see list below)
- cpu
Count number - created
At string The timestamp when the instance was created. *
availability_zone*blueprint_id*bundle_id*key_pair_name*user_data- ipv6Address string
- is
Static booleanIp - key
Pair stringName The name of your key pair. Created in the Lightsail console (cannot use
aws.ec2.KeyPairat this time)- name string
The name of the Lightsail Instance. Names be unique within each AWS Region in your Lightsail account.
- private
Ip stringAddress - public
Ip stringAddress - ram
Size number - {[key: string]: string}
A map of tags to assign to the resource.
- user
Data 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_ boolip - key_
pair_ strname The name of your key pair. Created in the Lightsail console (cannot use
aws.ec2.KeyPairat this time)- name str
The name of the Lightsail Instance. Names be unique within each AWS Region in your Lightsail account.
- private_
ip_ straddress - public_
ip_ straddress - ram_
size float - 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
awsTerraform Provider.