Skip to content

Commit 368e156

Browse files
SweetOpsosterman
authored andcommitted
Fix count logic for ebs, make variable region non-required (#5)
* Fix count logic for ebs, add tags for root device * Update Readme
1 parent ebb4c80 commit 368e156

File tree

7 files changed

+112
-47
lines changed

7 files changed

+112
-47
lines changed

README.md

Lines changed: 94 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<!-- This file was automatically generated by the `build-harness`. Make all changes to `README.yaml` and run `make readme` to rebuild this file. -->
2+
[![README Header][readme_header_img]][readme_header_link]
23

3-
[![Cloud Posse](https://cloudposse.com/logo-300x69.svg)](https://cloudposse.com)
4+
[![Cloud Posse][logo]](https://cpco.io/homepage)
45

56
# terraform-aws-ec2-instance-group [![Build Status](https://travis-ci.org/cloudposse/terraform-aws-ec2-instance-group.svg?branch=master)](https://travis-ci.org/cloudposse/terraform-aws-ec2-instance-group) [![Latest Release](https://img.shields.io/github/release/cloudposse/terraform-aws-ec2-instance-group.svg)](https://github.com/cloudposse/terraform-aws-ec2-instance-group/releases/latest) [![Slack Community](https://slack.cloudposse.com/badge.svg)](https://slack.cloudposse.com)
67

@@ -9,7 +10,7 @@ Terraform Module for providing N general purpose EC2 hosts.
910

1011
If you only need to provision a single EC2 instance, consider using the [terraform-aws-ec2-instance](https://github.com/cloudposse/terraform-aws-ec2-instance) module instead.
1112

12-
**IMPORTANT** This module by-design does not provision an AutoScaling group. It was designed to provision a discrete number of instances suitable for running stateful services such as databases (E.g. Kafka, Redis, etc).
13+
**IMPORTANT** This module by-design does not provision an AutoScaling group. It was designed to provision a discrete number of instances suitable for running stateful services such as databases (E.g. Kafka, Redis, etc).
1314

1415

1516
Included features:
@@ -21,7 +22,17 @@ Included features:
2122

2223
---
2324

24-
This project is part of our comprehensive ["SweetOps"](https://docs.cloudposse.com) approach towards DevOps.
25+
This project is part of our comprehensive ["SweetOps"](https://cpco.io/sweetops) approach towards DevOps.
26+
[<img align="right" title="Share via Email" src="https://docs.cloudposse.com/images/ionicons/ios-email-outline-2.0.1-16x16-999999.svg"/>][share_email]
27+
[<img align="right" title="Share on Google+" src="https://docs.cloudposse.com/images/ionicons/social-googleplus-outline-2.0.1-16x16-999999.svg" />][share_googleplus]
28+
[<img align="right" title="Share on Facebook" src="https://docs.cloudposse.com/images/ionicons/social-facebook-outline-2.0.1-16x16-999999.svg" />][share_facebook]
29+
[<img align="right" title="Share on Reddit" src="https://docs.cloudposse.com/images/ionicons/social-reddit-outline-2.0.1-16x16-999999.svg" />][share_reddit]
30+
[<img align="right" title="Share on LinkedIn" src="https://docs.cloudposse.com/images/ionicons/social-linkedin-outline-2.0.1-16x16-999999.svg" />][share_linkedin]
31+
[<img align="right" title="Share on Twitter" src="https://docs.cloudposse.com/images/ionicons/social-twitter-outline-2.0.1-16x16-999999.svg" />][share_twitter]
32+
33+
34+
[![Terraform Open Source Modules](https://docs.cloudposse.com/images/terraform-open-source-modules.svg)][terraform_modules]
35+
2536

2637

2738
It's 100% Open Source and licensed under the [APACHE2](LICENSE).
@@ -32,6 +43,11 @@ It's 100% Open Source and licensed under the [APACHE2](LICENSE).
3243

3344

3445

46+
We literally have [*hundreds of terraform modules*][terraform_modules] that are Open Source and well-maintained. Check them out!
47+
48+
49+
50+
3551

3652

3753

@@ -110,12 +126,12 @@ resource "aws_ami_from_instance" "example" {
110126
```
111127
Available targets:
112128
113-
help This help screen
129+
help Help screen
114130
help/all Display help for all targets
131+
help/short This help short screen
115132
lint Lint terraform code
116133
117134
```
118-
119135
## Inputs
120136

121137
| Name | Description | Type | Default | Required |
@@ -130,9 +146,9 @@ Available targets:
130146
| availability_zone | Availability Zone the instance is launched in. If not set, will be launched in the first AZ of the region | string | `` | no |
131147
| comparison_operator | The arithmetic operation to use when comparing the specified Statistic and Threshold. Possible values are: GreaterThanOrEqualToThreshold, GreaterThanThreshold, LessThanThreshold, LessThanOrEqualToThreshold. | string | `GreaterThanOrEqualToThreshold` | no |
132148
| create_default_security_group | Create default Security Group with only Egress traffic allowed | string | `true` | no |
133-
| default_alarm_action | | string | `action/actions/AWS_EC2.InstanceId.Reboot/1.0` | no |
149+
| default_alarm_action | - | string | `action/actions/AWS_EC2.InstanceId.Reboot/1.0` | no |
134150
| delete_on_termination | Whether the volume should be destroyed on instance termination | string | `true` | no |
135-
| delimiter | | string | `-` | no |
151+
| delimiter | - | string | `-` | no |
136152
| disable_api_termination | Enable EC2 Instance Termination Protection | string | `false` | no |
137153
| ebs_device_names | Name of the EBS device to mount | list | `<list>` | no |
138154
| ebs_iops | Amount of provisioned IOPS. This must be set with a volume_type of io1 | string | `0` | no |
@@ -154,7 +170,7 @@ Available targets:
154170
| name | Name (e.g. `bastion` or `db`) - required for `terraform-terraform-label` module | string | - | yes |
155171
| namespace | Namespace (e.g. `cp` or `cloudposse`) - required for `terraform-terraform-label` module | string | - | yes |
156172
| private_ips | Private IP address to associate with the instances in the VPC | list | `<list>` | no |
157-
| region | AWS Region the instance is launched in | string | - | yes |
173+
| region | AWS Region the instance is launched in | string | `` | no |
158174
| root_iops | Amount of provisioned IOPS. This must be set if root_volume_type is set to `io1` | string | `0` | no |
159175
| root_volume_size | Size of the root volume in gigabytes | string | `10` | no |
160176
| root_volume_type | Type of root volume. Can be standard, gp2 or io1 | string | `gp2` | no |
@@ -168,7 +184,7 @@ Available targets:
168184
| tags | Additional tags | map | `<map>` | no |
169185
| user_data | Instance user data. Do not pass gzip-compressed data via this argument | string | `` | no |
170186
| vpc_id | The ID of the VPC that the instance security group belongs to | string | - | yes |
171-
| welcome_message | | string | `` | no |
187+
| welcome_message | - | string | `` | no |
172188

173189
## Outputs
174190

@@ -195,6 +211,13 @@ Available targets:
195211

196212

197213

214+
## Share the Love
215+
216+
Like this project? Please give it a ★ on [our GitHub](https://github.com/cloudposse/terraform-aws-ec2-instance-group)! (it helps us **a lot**)
217+
218+
Are you using this project or any of our other projects? Consider [leaving a testimonial][testimonial]. =)
219+
220+
198221
## Related Projects
199222

200223
Check out these related projects.
@@ -219,26 +242,38 @@ For additional context, refer to some of these links.
219242

220243
File a GitHub [issue](https://github.com/cloudposse/terraform-aws-ec2-instance-group/issues), send us an [email][email] or join our [Slack Community][slack].
221244

245+
[![README Commercial Support][readme_commercial_support_img]][readme_commercial_support_link]
246+
222247
## Commercial Support
223248

224249
Work directly with our team of DevOps experts via email, slack, and video conferencing.
225250

226251
We provide [*commercial support*][commercial_support] for all of our [Open Source][github] projects. As a *Dedicated Support* customer, you have access to our team of subject matter experts at a fraction of the cost of a full-time engineer.
227252

228-
[![E-Mail](https://img.shields.io/badge/email-hello@cloudposse.com-blue.svg)](mailto:hello@cloudposse.com)
253+
[![E-Mail](https://img.shields.io/badge/email-hello@cloudposse.com-blue.svg)][email]
229254

230255
- **Questions.** We'll use a Shared Slack channel between your team and ours.
231256
- **Troubleshooting.** We'll help you triage why things aren't working.
232257
- **Code Reviews.** We'll review your Pull Requests and provide constructive feedback.
233258
- **Bug Fixes.** We'll rapidly work to fix any bugs in our projects.
234-
- **Build New Terraform Modules.** We'll develop original modules to provision infrastructure.
259+
- **Build New Terraform Modules.** We'll [develop original modules][module_development] to provision infrastructure.
235260
- **Cloud Architecture.** We'll assist with your cloud strategy and design.
236261
- **Implementation.** We'll provide hands-on support to implement our reference architectures.
237262

238263

239-
## Community Forum
240264

241-
Get access to our [Open Source Community Forum][slack] on Slack. It's **FREE** to join for everyone! Our "SweetOps" community is where you get to talk with others who share a similar vision for how to rollout and manage infrastructure. This is the best place to talk shop, ask questions, solicit feedback, and work together as a community to build *sweet* infrastructure.
265+
## Terraform Module Development
266+
267+
Are you interested in custom Terraform module development? Submit your inquiry using [our form][module_development] today and we'll get back to you ASAP.
268+
269+
270+
## Slack Community
271+
272+
Join our [Open Source Community][slack] on Slack. It's **FREE** for everyone! Our "SweetOps" community is where you get to talk with others who share a similar vision for how to rollout and manage infrastructure. This is the best place to talk shop, ask questions, solicit feedback, and work together as a community to build totally *sweet* infrastructure.
273+
274+
## Newsletter
275+
276+
Signup for [our newsletter][newsletter] that covers everything on our technology radar. Receive updates on what we're up to on GitHub as well as awesome new projects we discover.
242277

243278
## Contributing
244279

@@ -248,7 +283,7 @@ Please use the [issue tracker](https://github.com/cloudposse/terraform-aws-ec2-i
248283

249284
### Developing
250285

251-
If you are interested in being a contributor and want to get involved in developing this project or [help out](https://github.com/orgs/cloudposse/projects/3) with our other projects, we would love to hear from you! Shoot us an [email](mailto:hello@cloudposse.com).
286+
If you are interested in being a contributor and want to get involved in developing this project or [help out](https://cpco.io/help-out) with our other projects, we would love to hear from you! Shoot us an [email][email].
252287

253288
In general, PRs are welcome. We follow the typical "fork-and-pull" Git workflow.
254289

@@ -263,7 +298,7 @@ In general, PRs are welcome. We follow the typical "fork-and-pull" Git workflow.
263298

264299
## Copyright
265300

266-
Copyright © 2017-2018 [Cloud Posse, LLC](https://cloudposse.com)
301+
Copyright © 2017-2019 [Cloud Posse, LLC](https://cpco.io/copyright)
267302

268303

269304

@@ -304,36 +339,61 @@ All other trademarks referenced herein are the property of their respective owne
304339

305340
## About
306341

307-
This project is maintained and funded by [Cloud Posse, LLC][website]. Like it? Please let us know at <hello@cloudposse.com>
342+
This project is maintained and funded by [Cloud Posse, LLC][website]. Like it? Please let us know by [leaving a testimonial][testimonial]!
308343

309-
[![Cloud Posse](https://cloudposse.com/logo-300x69.svg)](https://cloudposse.com)
344+
[![Cloud Posse][logo]][website]
310345

311-
We're a [DevOps Professional Services][hire] company based in Los Angeles, CA. We love [Open Source Software](https://github.com/cloudposse/)!
346+
We're a [DevOps Professional Services][hire] company based in Los Angeles, CA. We ❤️ [Open Source Software][we_love_open_source].
312347

313-
We offer paid support on all of our projects.
348+
We offer [paid support][commercial_support] on all of our projects.
314349

315-
Check out [our other projects][github], [apply for a job][jobs], or [hire us][hire] to help with your cloud strategy and implementation.
350+
Check out [our other projects][github], [follow us on twitter][twitter], [apply for a job][jobs], or [hire us][hire] to help with your cloud strategy and implementation.
316351

317-
[docs]: https://docs.cloudposse.com/
318-
[website]: https://cloudposse.com/
319-
[github]: https://github.com/cloudposse/
320-
[commercial_support]: https://github.com/orgs/cloudposse/projects
321-
[jobs]: https://cloudposse.com/jobs/
322-
[hire]: https://cloudposse.com/contact/
323-
[slack]: https://slack.cloudposse.com/
324-
[linkedin]: https://www.linkedin.com/company/cloudposse
325-
[twitter]: https://twitter.com/cloudposse/
326-
[email]: mailto:hello@cloudposse.com
327352

328353

329354
### Contributors
330355

331-
| [![Erik Osterman][osterman_avatar]][osterman_homepage]<br/>[Erik Osterman][osterman_homepage] | [![Jamie Nelson][Jamie-BitFlight_avatar]][Jamie-BitFlight_homepage]<br/>[Jamie Nelson][Jamie-BitFlight_homepage] |
332-
|---|---|
356+
| [![Erik Osterman][osterman_avatar]][osterman_homepage]<br/>[Erik Osterman][osterman_homepage] | [![Jamie Nelson][Jamie-BitFlight_avatar]][Jamie-BitFlight_homepage]<br/>[Jamie Nelson][Jamie-BitFlight_homepage] | [![Vladimir][SweetOps_avatar]][SweetOps_homepage]<br/>[Vladimir][SweetOps_homepage] |
357+
|---|---|---|
333358

334359
[osterman_homepage]: https://github.com/osterman
335360
[osterman_avatar]: https://github.com/osterman.png?size=150
336361
[Jamie-BitFlight_homepage]: https://github.com/Jamie-BitFlight
337362
[Jamie-BitFlight_avatar]: https://github.com/Jamie-BitFlight.png?size=150
338-
339-
363+
[SweetOps_homepage]: https://github.com/SweetOps
364+
[SweetOps_avatar]: https://github.com/SweetOps.png?size=150
365+
366+
367+
368+
[![README Footer][readme_footer_img]][readme_footer_link]
369+
[![Beacon][beacon]][website]
370+
371+
[logo]: https://cloudposse.com/logo-300x69.svg
372+
[docs]: https://cpco.io/docs
373+
[website]: https://cpco.io/homepage
374+
[github]: https://cpco.io/github
375+
[jobs]: https://cpco.io/jobs
376+
[hire]: https://cpco.io/hire
377+
[slack]: https://cpco.io/slack
378+
[linkedin]: https://cpco.io/linkedin
379+
[twitter]: https://cpco.io/twitter
380+
[testimonial]: https://cpco.io/leave-testimonial
381+
[newsletter]: https://cpco.io/newsletter
382+
[email]: https://cpco.io/email
383+
[commercial_support]: https://cpco.io/commercial-support
384+
[we_love_open_source]: https://cpco.io/we-love-open-source
385+
[module_development]: https://cpco.io/module-development
386+
[terraform_modules]: https://cpco.io/terraform-modules
387+
[readme_header_img]: https://cloudposse.com/readme/header/img?repo=cloudposse/terraform-aws-ec2-instance-group
388+
[readme_header_link]: https://cloudposse.com/readme/header/link?repo=cloudposse/terraform-aws-ec2-instance-group
389+
[readme_footer_img]: https://cloudposse.com/readme/footer/img?repo=cloudposse/terraform-aws-ec2-instance-group
390+
[readme_footer_link]: https://cloudposse.com/readme/footer/link?repo=cloudposse/terraform-aws-ec2-instance-group
391+
[readme_commercial_support_img]: https://cloudposse.com/readme/commercial-support/img?repo=cloudposse/terraform-aws-ec2-instance-group
392+
[readme_commercial_support_link]: https://cloudposse.com/readme/commercial-support/link?repo=cloudposse/terraform-aws-ec2-instance-group
393+
[share_twitter]: https://twitter.com/intent/tweet/?text=terraform-aws-ec2-instance-group&url=https://github.com/cloudposse/terraform-aws-ec2-instance-group
394+
[share_linkedin]: https://www.linkedin.com/shareArticle?mini=true&title=terraform-aws-ec2-instance-group&url=https://github.com/cloudposse/terraform-aws-ec2-instance-group
395+
[share_reddit]: https://reddit.com/submit/?url=https://github.com/cloudposse/terraform-aws-ec2-instance-group
396+
[share_facebook]: https://facebook.com/sharer/sharer.php?u=https://github.com/cloudposse/terraform-aws-ec2-instance-group
397+
[share_googleplus]: https://plus.google.com/share?url=https://github.com/cloudposse/terraform-aws-ec2-instance-group
398+
[share_email]: mailto:?subject=terraform-aws-ec2-instance-group&body=https://github.com/cloudposse/terraform-aws-ec2-instance-group
399+
[beacon]: https://ga-beacon.cloudposse.com/UA-76589703-4/cloudposse/terraform-aws-ec2-instance-group?pixel&cs=github&cm=readme&an=terraform-aws-ec2-instance-group

README.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ description: |-
4545
4646
If you only need to provision a single EC2 instance, consider using the [terraform-aws-ec2-instance](https://github.com/cloudposse/terraform-aws-ec2-instance) module instead.
4747
48-
**IMPORTANT** This module by-design does not provision an AutoScaling group. It was designed to provision a discrete number of instances suitable for running stateful services such as databases (E.g. Kafka, Redis, etc).
48+
**IMPORTANT** This module by-design does not provision an AutoScaling group. It was designed to provision a discrete number of instances suitable for running stateful services such as databases (E.g. Kafka, Redis, etc).
4949
5050
5151
Included features:
@@ -134,4 +134,6 @@ contributors:
134134
- name: "Erik Osterman"
135135
github: "osterman"
136136
- name: "Jamie Nelson"
137-
github: "Jamie-BitFlight"
137+
github: "Jamie-BitFlight"
138+
- name: "Vladimir"
139+
github: "SweetOps"

cloud_watch_alarm.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Restart dead or hung instance
22

33
locals {
4-
action = "arn:aws:swf:${var.region}:${data.aws_caller_identity.default.account_id}:${var.default_alarm_action}"
4+
action = "arn:aws:swf:${local.region}:${data.aws_caller_identity.default.account_id}:${var.default_alarm_action}"
55
}
66

77
resource "aws_cloudwatch_metric_alarm" "default" {

docs/targets.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22
```
33
Available targets:
44
5-
help This help screen
5+
help Help screen
66
help/all Display help for all targets
7+
help/short This help short screen
78
lint Lint terraform code
89
910
```

docs/terraform.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
## Inputs
32

43
| Name | Description | Type | Default | Required |
@@ -13,9 +12,9 @@
1312
| availability_zone | Availability Zone the instance is launched in. If not set, will be launched in the first AZ of the region | string | `` | no |
1413
| comparison_operator | The arithmetic operation to use when comparing the specified Statistic and Threshold. Possible values are: GreaterThanOrEqualToThreshold, GreaterThanThreshold, LessThanThreshold, LessThanOrEqualToThreshold. | string | `GreaterThanOrEqualToThreshold` | no |
1514
| create_default_security_group | Create default Security Group with only Egress traffic allowed | string | `true` | no |
16-
| default_alarm_action | | string | `action/actions/AWS_EC2.InstanceId.Reboot/1.0` | no |
15+
| default_alarm_action | - | string | `action/actions/AWS_EC2.InstanceId.Reboot/1.0` | no |
1716
| delete_on_termination | Whether the volume should be destroyed on instance termination | string | `true` | no |
18-
| delimiter | | string | `-` | no |
17+
| delimiter | - | string | `-` | no |
1918
| disable_api_termination | Enable EC2 Instance Termination Protection | string | `false` | no |
2019
| ebs_device_names | Name of the EBS device to mount | list | `<list>` | no |
2120
| ebs_iops | Amount of provisioned IOPS. This must be set with a volume_type of io1 | string | `0` | no |
@@ -37,7 +36,7 @@
3736
| name | Name (e.g. `bastion` or `db`) - required for `terraform-terraform-label` module | string | - | yes |
3837
| namespace | Namespace (e.g. `cp` or `cloudposse`) - required for `terraform-terraform-label` module | string | - | yes |
3938
| private_ips | Private IP address to associate with the instances in the VPC | list | `<list>` | no |
40-
| region | AWS Region the instance is launched in | string | - | yes |
39+
| region | AWS Region the instance is launched in | string | `` | no |
4140
| root_iops | Amount of provisioned IOPS. This must be set if root_volume_type is set to `io1` | string | `0` | no |
4241
| root_volume_size | Size of the root volume in gigabytes | string | `10` | no |
4342
| root_volume_type | Type of root volume. Can be standard, gp2 or io1 | string | `gp2` | no |
@@ -51,7 +50,7 @@
5150
| tags | Additional tags | map | `<map>` | no |
5251
| user_data | Instance user data. Do not pass gzip-compressed data via this argument | string | `` | no |
5352
| vpc_id | The ID of the VPC that the instance security group belongs to | string | - | yes |
54-
| welcome_message | | string | `` | no |
53+
| welcome_message | - | string | `` | no |
5554

5655
## Outputs
5756

0 commit comments

Comments
 (0)