Skip to content

Commit c7f866b

Browse files
antoniocanelasAntonio Canelas
andauthored
Adds AWS EC2 Service Name to service. (#61)
* Adds AWS EC2 Service Name to service. * Fix variable type to list(string) * Adds markdown updates after make init & make readme. Co-authored-by: Antonio Canelas <[email protected]>
1 parent 52c6274 commit c7f866b

File tree

5 files changed

+34
-42
lines changed

5 files changed

+34
-42
lines changed

README.md

Lines changed: 23 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,20 @@
1-
<!--
2-
3-
4-
5-
6-
7-
8-
1+
# terraform-aws-elasticsearch [![Codefresh Build Status](https://g.codefresh.io/api/badges/pipeline/cloudposse/terraform-modules%2Fterraform-aws-elasticsearch?type=cf-1)](https://g.codefresh.io/public/accounts/cloudposse/pipelines/5d22bfe5a7e22ea3b67ea820) [![Latest Release](https://img.shields.io/github/release/cloudposse/terraform-aws-elasticsearch.svg)](https://github.com/cloudposse/terraform-aws-elasticsearch/releases/latest) [![Slack Community](https://slack.cloudposse.com/badge.svg)](https://slack.cloudposse.com)
92

3+
[![README Header][readme_header_img]][readme_header_link]
104

5+
[![Cloud Posse][logo]](https://cpco.io/homepage)
116

7+
<!--
128
139
1410
1511
1612
** DO NOT EDIT THIS FILE
17-
**
18-
** This file was automatically generated by the `build-harness`.
19-
** 1) Make all changes to `README.yaml`
13+
**
14+
** This file was automatically generated by the `build-harness`.
15+
** 1) Make all changes to `README.yaml`
2016
** 2) Run `make init` (you only need to do this once)
21-
** 3) Run`make readme` to rebuild this file.
17+
** 3) Run`make readme` to rebuild this file.
2218
**
2319
** (We maintain HUNDREDS of open source projects. This is how we maintain our sanity.)
2420
**
@@ -27,30 +23,14 @@
2723
2824
2925
30-
31-
32-
33-
34-
35-
36-
37-
38-
39-
40-
-->
41-
[![README Header][readme_header_img]][readme_header_link]
42-
43-
[![Cloud Posse][logo]](https://cpco.io/homepage)
44-
45-
# terraform-aws-elasticsearch [![Codefresh Build Status](https://g.codefresh.io/api/badges/pipeline/cloudposse/terraform-modules%2Fterraform-aws-elasticsearch?type=cf-1)](https://g.codefresh.io/public/accounts/cloudposse/pipelines/5d22bfe5a7e22ea3b67ea820) [![Latest Release](https://img.shields.io/github/release/cloudposse/terraform-aws-elasticsearch.svg)](https://github.com/cloudposse/terraform-aws-elasticsearch/releases/latest) [![Slack Community](https://slack.cloudposse.com/badge.svg)](https://slack.cloudposse.com)
46-
26+
-->
4727

4828
Terraform module to provision an [`Elasticsearch`](https://aws.amazon.com/elasticsearch-service/) cluster with built-in integrations with [Kibana](https://aws.amazon.com/elasticsearch-service/kibana/) and [Logstash](https://aws.amazon.com/elasticsearch-service/logstash/).
4929

5030

5131
---
5232

53-
This project is part of our comprehensive ["SweetOps"](https://cpco.io/sweetops) approach towards DevOps.
33+
This project is part of our comprehensive ["SweetOps"](https://cpco.io/sweetops) approach towards DevOps.
5434
[<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]
5535
[<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]
5636
[<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]
@@ -71,7 +51,7 @@ It's 100% Open Source and licensed under the [APACHE2](LICENSE).
7151

7252

7353

74-
We literally have [*hundreds of terraform modules*][terraform_modules] that are Open Source and well-maintained. Check them out!
54+
We literally have [*hundreds of terraform modules*][terraform_modules] that are Open Source and well-maintained. Check them out!
7555

7656

7757

@@ -131,8 +111,9 @@ module "elasticsearch" {
131111

132112

133113

114+
<!-- markdownlint-disable -->
134115
## Makefile Targets
135-
```
116+
```text
136117
Available targets:
137118
138119
help Help screen
@@ -141,6 +122,7 @@ Available targets:
141122
lint Lint terraform code
142123
143124
```
125+
<!-- markdownlint-restore -->
144126
## Requirements
145127

146128
| Name | Version |
@@ -166,6 +148,7 @@ Available targets:
166148
| attributes | Additional attributes (e.g. `1`) | `list(string)` | `[]` | no |
167149
| automated\_snapshot\_start\_hour | Hour at which automated snapshots are taken, in UTC | `number` | `0` | no |
168150
| availability\_zone\_count | Number of Availability Zones for the domain to use. | `number` | `2` | no |
151+
| aws\_ec2\_service\_name | AWS EC2 Service Name | `list(string)` | <pre>[<br> "ec2.amazonaws.com"<br>]</pre> | no |
169152
| cognito\_authentication\_enabled | Whether to enable Amazon Cognito authentication with Kibana | `bool` | `false` | no |
170153
| cognito\_iam\_role\_arn | ARN of the IAM role that has the AmazonESCognitoAccess policy attached | `string` | `""` | no |
171154
| cognito\_identity\_pool\_id | The ID of the Cognito Identity Pool to use | `string` | `""` | no |
@@ -235,7 +218,7 @@ Available targets:
235218

236219
## References
237220

238-
For additional context, refer to some of these links.
221+
For additional context, refer to some of these links.
239222

240223
- [What is Amazon Elasticsearch Service](https://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/what-is-amazon-elasticsearch-service.html) - Complete description of Amazon Elasticsearch Service
241224
- [Amazon Elasticsearch Service Access Control](https://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/es-ac.html) - Describes several ways of controlling access to Elasticsearch domains
@@ -250,7 +233,7 @@ For additional context, refer to some of these links.
250233

251234
## Help
252235

253-
**Got a question?** We got answers.
236+
**Got a question?** We got answers.
254237

255238
File a GitHub [issue](https://github.com/cloudposse/terraform-aws-elasticsearch/issues), send us an [email][email] or join our [Slack Community][slack].
256239

@@ -259,7 +242,7 @@ File a GitHub [issue](https://github.com/cloudposse/terraform-aws-elasticsearch/
259242
## DevOps Accelerator for Startups
260243

261244

262-
We are a [**DevOps Accelerator**][commercial_support]. We'll help you build your cloud infrastructure from the ground up so you can own it. Then we'll show you how to operate it and stick around for as long as you need us.
245+
We are a [**DevOps Accelerator**][commercial_support]. We'll help you build your cloud infrastructure from the ground up so you can own it. Then we'll show you how to operate it and stick around for as long as you need us.
263246

264247
[![Learn More](https://img.shields.io/badge/learn%20more-success.svg?style=for-the-badge)][commercial_support]
265248

@@ -288,11 +271,11 @@ Participate in our [Discourse Forums][discourse]. Here you'll find answers to co
288271

289272
## Newsletter
290273

291-
Sign up 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.
274+
Sign up 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.
292275

293276
## Office Hours
294277

295-
[Join us every Wednesday via Zoom][office_hours] for our weekly "Lunch & Learn" sessions. It's **FREE** for everyone!
278+
[Join us every Wednesday via Zoom][office_hours] for our weekly "Lunch & Learn" sessions. It's **FREE** for everyone!
296279

297280
[![zoom](https://img.cloudposse.com/fit-in/200x200/https://cloudposse.com/wp-content/uploads/2019/08/Powered-by-Zoom.png")][office_hours]
298281

@@ -323,9 +306,9 @@ Copyright © 2017-2020 [Cloud Posse, LLC](https://cpco.io/copyright)
323306

324307

325308

326-
## License
309+
## License
327310

328-
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
311+
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
329312

330313
See [LICENSE](LICENSE) for full details.
331314

@@ -366,7 +349,7 @@ This project is maintained and funded by [Cloud Posse, LLC][website]. Like it? P
366349

367350
We're a [DevOps Professional Services][hire] company based in Los Angeles, CA. We ❤️ [Open Source Software][we_love_open_source].
368351

369-
We offer [paid support][commercial_support] on all of our projects.
352+
We offer [paid support][commercial_support] on all of our projects.
370353

371354
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.
372355

docs/targets.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1+
<!-- markdownlint-disable -->
12
## Makefile Targets
2-
```
3+
```text
34
Available targets:
45
56
help Help screen
@@ -8,3 +9,4 @@ Available targets:
89
lint Lint terraform code
910
1011
```
12+
<!-- markdownlint-restore -->

docs/terraform.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
| attributes | Additional attributes (e.g. `1`) | `list(string)` | `[]` | no |
2424
| automated\_snapshot\_start\_hour | Hour at which automated snapshots are taken, in UTC | `number` | `0` | no |
2525
| availability\_zone\_count | Number of Availability Zones for the domain to use. | `number` | `2` | no |
26+
| aws\_ec2\_service\_name | AWS EC2 Service Name | `list(string)` | <pre>[<br> "ec2.amazonaws.com"<br>]</pre> | no |
2627
| cognito\_authentication\_enabled | Whether to enable Amazon Cognito authentication with Kibana | `bool` | `false` | no |
2728
| cognito\_iam\_role\_arn | ARN of the IAM role that has the AmazonESCognitoAccess policy attached | `string` | `""` | no |
2829
| cognito\_identity\_pool\_id | The ID of the Cognito Identity Pool to use | `string` | `""` | no |

main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ data "aws_iam_policy_document" "assume_role" {
9393

9494
principals {
9595
type = "Service"
96-
identifiers = ["ec2.amazonaws.com"]
96+
identifiers = var.aws_ec2_service_name
9797
}
9898

9999
principals {

variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,3 +310,9 @@ variable "cognito_iam_role_arn" {
310310
default = ""
311311
description = "ARN of the IAM role that has the AmazonESCognitoAccess policy attached"
312312
}
313+
314+
variable "aws_ec2_service_name" {
315+
type = list(string)
316+
default = ["ec2.amazonaws.com"]
317+
description = "AWS EC2 Service Name"
318+
}

0 commit comments

Comments
 (0)