Skip to content

MagnetarIT/terraform-aws-lightsail

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

terraform-aws-lightsail

Terraform (>= 0.12.0) module to create an Lightsail instance

Build Status Latest Release


Example

provider "aws" {
  region = "eu-west-2"
}

module "lightsail" {
  source = "../"
  namespace = "mag"
  environment = "dev"
  name = "myapp"
}

Intro

This module will create the following resources

  • Lightsail Instance
  • Lightsail Key Pair (Optional)
  • Lightsail Static IP (Optional)
  • Metric alarm (Optional)

Providers

Name Version
aws ~> 2.0
null ~> 2.0

Inputs

Name Description Type Default Required
attributes Additional attributes (e.g. 1) list(string) [] no
availability_zone The Availability Zone in which to create your instance string "eu-west-2a" no
blueprint_id n/a string "wordpress" no
bundle_id The bundle of specification information string "micro_2_0" no
create_static_ip Create and attach a statis IP to the instance bool true no
customer_business_name Customers business name, used for notifications and reporting string n/a yes
customer_email Customers email address, used to track owners of the platform, used for notifications and reporting string n/a yes
enable_email_alarm Enable metric for StatusCheckFailed which will notify using email bool true no
environment Environment, e.g. 'prod', 'staging', 'dev', 'pre-prod', 'UAT' string n/a yes
key_pair_name The name of your key pair. Created in the Lightsail console (cannot use aws_key_pair at this time) string "" no
name Solution name, e.g. 'app' or 'jenkins' string n/a yes
namespace Namespace, which could be your team, business name or abbreviation, e.g. 'mag' or 'tar' string n/a yes
tags Additional tags (e.g. map('BusinessUnit','XYZ') map(string) {} no
use_default_key_pair Default key pair name will be used, you must keep 'key_pair_name' empty string "false" no
user_data launch script to configure server with additional user data string "" no

Outputs

Name Description
arn n/a
availability_zone n/a
blueprint_id n/a
bundle_id n/a
created_at n/a
encrypted_fingerprint n/a
encrypted_private_key n/a
fingerprint n/a
id n/a
ip_address n/a
key_arn n/a
key_id n/a
key_pair_name n/a
private_key n/a
public_key n/a
staticip_arn n/a
staticip_support_code n/a
user_data n/a

Support

Reach out to me at one of the following places!


License

License

See LICENSE for full details.

Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements.  See the NOTICE file
distributed with this work for additional information
regarding copyright ownership.  The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License.  You may obtain a copy of the License at

  https://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied.  See the License for the
specific language governing permissions and limitations
under the License.