forked from cloudposse/terraform-aws-ec2-instance
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.yaml
138 lines (119 loc) · 4.34 KB
/
README.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
---
#
# This is the canonical configuration for the `README.md`
# Run `make readme` to rebuild the `README.md`
#
# Name of this project
name: terraform-aws-ec2-instance
# Tags of this project
tags:
- aws
- terraform
- terraform-modules
- platform
- ec2
- instance
- security
- ansible
# Categories of this project
categories:
- terraform-modules/platform
# Logo for this project
#logo: docs/logo.png
# License of this project
license: "APACHE2"
# Canonical GitHub repo
github_repo: cloudposse/terraform-aws-ec2-instance
# Badges to display
badges:
- name: "Build Status"
image: "https://travis-ci.org/cloudposse/terraform-aws-ec2-instance.svg?branch=master"
url: "https://travis-ci.org/cloudposse/terraform-aws-ec2-instance"
- name: "Latest Release"
image: "https://img.shields.io/github/release/cloudposse/terraform-aws-ec2-instance.svg"
url: "https://github.com/cloudposse/terraform-aws-ec2-instance/releases/latest"
- name: "Slack Community"
image: "https://slack.cloudposse.com/badge.svg"
url: "https://slack.cloudposse.com"
related:
- name: "terraform-aws-ec2-ami-backup"
description: "Terraform module for automatic & scheduled AMI creation"
url: "https://github.com/cloudposse/terraform-aws-ec2-ami-backup"
- name: "terraform-aws-ec2-ami-snapshot"
description: "Terraform module to easily generate AMI snapshots to create replica instances"
url: "https://github.com/cloudposse/terraform-aws-ec2-ami-snapshot"
- name: "terraform-aws-ec2-cloudwatch-sns-alarms"
description: "Terraform module that configures CloudWatch SNS alerts for EC2 instances"
url: "https://github.com/cloudposse/terraform-aws-ec2-cloudwatch-sns-alarms"
- name: "terraform-null-label"
description: "Terraform Module to define a consistent naming convention by (namespace, stage, name, [attributes])"
url: "https://github.com/cloudposse/terraform-null-label"
# Short description of this project
description: |-
Terraform Module for provisioning a general purpose EC2 host.
Included features:
* Automatically create a Security Group
* Option to switch EIP attachment
* CloudWatch monitoring and automatic reboot if instance hangs
* Assume Role capability
# How to use this project
usage: |-
Note: add `${var.ssh_key_pair}` private key to the `ssh agent`.
Include this repository as a module in your existing terraform code.
### Simple example:
```hcl
module "instance" {
source = "git::https://github.com/cloudposse/terraform-aws-ec2-instance.git?ref=master"
ssh_key_pair = "${var.ssh_key_pair}"
instance_type = "${var.instance_type}"
vpc_id = "${var.vpc_id}"
security_groups = ["${var.security_groups}"]
subnet = "${var.subnet}"
name = "${var.name}"
namespace = "${var.namespace}"
stage = "${var.stage}"
}
```
### Example with additional volumes and EIP
```hcl
module "kafka_instance" {
source = "git::https://github.com/cloudposse/terraform-aws-ec2-instance.git?ref=master"
ssh_key_pair = "${var.ssh_key_pair}"
vpc_id = "${var.vpc_id}"
security_groups = ["${var.security_groups}"]
subnet = "${var.subnet}"
associate_public_ip_address = "true"
name = "kafka"
namespace = "cp"
stage = "dev"
additional_ips_count = "1"
ebs_volume_count = "2"
allowed_ports = ["22", "80", "443"]
}
```
# References
references:
- name: "terraform-aws-ec2-bastion-server"
description: 'Terraform Module to define a generic Bastion host with parameterized user_data'
url: "https://github.com/cloudposse/terraform-aws-ec2-bastion-server"
include:
- "docs/targets.md"
- "docs/terraform.md"
# Contributors to this project
contributors:
- name: "Erik Osterman"
github: "osterman"
- name: "Igor Rodionov"
github: "goruha"
- name: "Andriy Knysh"
github: "aknysh"
- name: "Sergey Vasilyev"
github: "s2504s"
- name: "Valeriy"
github: "drama17"
- name: "Ivan Pinatti"
github: "ivan-pinatti"
- name: "Vladimir"
github: "SweetOps"
- name: "Konstantin B"
github: "comeanother"