» Resource: aws_lightsail_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.

» Example Usage

# Create a new GitLab Lightsail Instance
resource "aws_lightsail_instance" "gitlab_test" {
  name              = "custom_gitlab"
  availability_zone = "us-east-1b"
  blueprint_id      = "string"
  bundle_id         = "string"
  key_pair_name     = "some_key_name"
}

» Argument Reference

The following arguments are supported:

  • name - (Required) The name of the Lightsail Instance
  • availability_zone - (Required) The Availability Zone in which to create your instance (see list below)
  • blueprint_id - (Required) The ID for a virtual private server image (see list below)
  • bundle_id - (Required) The bundle of specification information (see list below)
  • key_pair_name - (Optional) The name of your key pair. Created in the Lightsail console (cannot use aws_key_pair at this time)
  • user_data - (Optional) launch script to configure server with additional user data

» Availability Zones

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

» Blueprints

Lightsail currently supports the following Blueprint IDs:

» OS Only

» Apps and OS

» 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:

» 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

» Attributes Reference

The following attributes are exported in addition to the arguments listed above:

» Import

Lightsail Instances can be imported using their name, e.g.

$ terraform import aws_lightsail_instance.gitlab_test 'custom gitlab'