mirror of
https://github.com/opentffoundation/opentf.git
synced 2026-02-02 18:00:18 -05:00
2.3 KiB
2.3 KiB
layout, page_title, sidebar_current, description
| layout | page_title | sidebar_current | description |
|---|---|---|---|
| aws | AWS: aws_lightsail_instance | docs-aws-resource-lightsail-instance | Provides an Lightsail Instance |
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.
Note: Lightsail is currently only supported in us-east-1 region.
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 Instanceavailability_zone- (Required) The Availability Zone in which to create your instance. At this time, must be inus-east-1regionblueprint_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- (Required) The name of your key pair. Created in the Lightsail console (cannot useaws_key_pairat this time)user_data- (Optional) launch script to configure server with additional user data
Blueprints
Lightsail currently supports the following Blueprint IDs:
amazon_linux_2016_09_0ubuntu_16_04wordpress_4_6_1lamp_5_6_27nodejs_6_9_1joomla_3_6_3magento_2_1_2mean_3_2_10drupal_8_2_1gitlab_8_12_6redmine_3_3_1nginx_1_10_2
Bundles
Lightsail currently supports the following Bundle IDs:
nano_1_0micro_1_0small_1_0medium_1_0large_1_0
Attributes Reference
The following attributes are exported in addition to the arguments listed above:
id- The ARN of the Lightsail instance (matchesarn).arn- The ARN of the Lightsail instance (matchesid).availability_zoneblueprint_idbundle_idkey_pair_nameuser_data
Import
Lightsail Instances can be imported using their ARN, e.g.
$ terraform import aws_lightsail_instance.bar <arn>