8000 GitHub - opsd-io/terraform-module-aws-launch-template at init
[go: up one dir, main page]

Skip to content

opsd-io/terraform-module-aws-launch-template

 
 

Repository files navigation

OPSd

Meet OPSd. The unique and effortless way of managing cloud infrastructure.

terraform-module-template

Introduction

Terraform module which creates a launch template that contains the configuration information to launch an instance.

Usage

module "launch_template_amd64" {
  source = "../modules/terraform-module-aws-launch-template"

  name                               = "foo-amd64"
  image_id                           = "ami-0a0956a3bacfbf233"
  vpc_security_group_ids             = ["sg-09d49e22dafd43e23", "sg-0ea844093e906d7fg"]
  user_data                          = "IyEvYmluL2Jhc2gKI0ZvciB1c2Ugd2l0aCB0aGUgQVNHIHVzZXIgZGF0YSBzZWN0aW9uIG9mIExhdW5jaCBDb25maWdzIHB1c2ggbXExClNUQVJUVElNRT0k"
  key_name                           = "mykey"
  iam_instance_profile               = "myprofile"
}

IMPORTANT: Make sure not to pin to master because there may be breaking changes between releases.

Requirements

Name Version
terraform >= 1.5.5
aws ~> 5.0

Providers

Name Version
aws ~> 5.0

Modules

No modules.

Resources

Name Type
aws_launch_template.main resource

Inputs

Name Description Type Default Required
ebs_optimized If true, used EC2 instance will be EBS-optimized bool false no
iam_instance_profile The IAM Instance Profile to launch the instance with.
object({
name = optional(string)
arn = optional(string)
})
n/a yes
image_id The name of the AMI. string n/a yes
instance_type The type of the instance. string null no
key_name The Name of ssh public key to add to ec2-user account. string n/a yes
launch_template_description Description of the launch template. string null no
launch_template_version A version of the launch template string "$Default" no
metadata_options Customize the metadata options for the instance.
object({
http_endpoint = optional(string)
http_tokens = optional(string)
http_put_response_hop_limit = optional(number)
http_protocol_ipv6 = optional(string)
instance_metadata_tags = optional(string)
})
{
"instance_metadata_tags": "enabled"
}
no
name The name of the launch template. string n/a yes
network_interfaces A list of network interfaces to be attached to the instance.
list(object({
associate_carrier_ip_address = optional(bool),
associate_public_ip_address = optional(bool),
delete_on_termination = optional(string),
description = optional(string),
device_index = optional(string),
interface_type = optional(string),
ipv4_addresses = optional(list(string), []),
ipv4_address_count = optional(number),
ipv6_addresses = optional(list(string), []),
ipv6_address_count = optional(string),
network_interface_id = optional(string),
private_ip_address = optional(string),
security_groups = optional(string),
subnet_id = optional(string),
}))
[] no
tags The Tags to to apply to the launch template, EC2, volume, network interface. map(string) {} no
user_data The user data to pass to the instance at launch time. string null no
vpc_security_group_ids A list of security group IDs to assign to. list(string) [] no

Outputs

Name Description
arn Amazon Resource Name (ARN) of the launch template.
id The ID of the launch template.
name Amazon Resource Name (ARN) of the launch template.

Examples of usage

Do you want to see how the module works? See all the usage examples.

Related modules

The list of related modules (if present).

Contributing

If you are interested in contributing to the project, see see our guide.

Support

If you have a problem with the module or want to propose a new feature, you can report it via the project's (Github) issue tracker.

If you want to discuss something in person, you can join our community on Slack.

License

Apache License 2.0

About

Terraform module for creating AWS launch template.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

0