Skip to content

Commit cb85357

Browse files
Stephen Coeosterman
authored andcommitted
Input variable for replication_group_id (#28)
* adding an input variable for replication_group_id * fix formatting * updating docs
1 parent eb3a647 commit cb85357

File tree

4 files changed

+83
-25
lines changed

4 files changed

+83
-25
lines changed

README.md

Lines changed: 75 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +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-
4-
[![Cloud Posse](https://cloudposse.com/logo-300x69.svg)](https://cloudposse.com)
4+
[![Cloud Posse][logo]](https://cpco.io/homepage)
55

66
# terraform-aws-elasticache-redis [![Build Status](https://travis-ci.org/cloudposse/terraform-aws-elasticache-redis.svg?branch=master)](https://travis-ci.org/cloudposse/terraform-aws-elasticache-redis) [![Latest Release](https://img.shields.io/github/release/cloudposse/terraform-aws-elasticache-redis.svg)](https://github.com/cloudposse/terraform-aws-elastic-beanstalk-environment/releases/latest) [![Slack Community](https://slack.cloudposse.com/badge.svg)](https://slack.cloudposse.com)
77

@@ -11,7 +11,17 @@ Terraform module to provision an [`ElastiCache`](https://aws.amazon.com/elastica
1111

1212
---
1313

14-
This project is part of our comprehensive ["SweetOps"](https://docs.cloudposse.com) approach towards DevOps.
14+
This project is part of our comprehensive ["SweetOps"](https://cpco.io/sweetops) approach towards DevOps.
15+
[<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]
16+
[<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]
17+
[<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]
18+
[<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]
19+
[<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]
20+
[<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]
21+
22+
23+
[![Terraform Open Source Modules](https://docs.cloudposse.com/images/terraform-open-source-modules.svg)][terraform_modules]
24+
1525

1626

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

2333

2434

35+
We literally have [*hundreds of terraform modules*][terraform_modules] that are Open Source and well-maintained. Check them out!
36+
37+
38+
39+
2540

2641

2742

@@ -109,6 +124,7 @@ Available targets:
109124
| notification_topic_arn | Notification topic arn | string | `` | no |
110125
| parameter | A list of Redis parameters to apply. Note that parameters may differ from one Redis family to another | list | `<list>` | no |
111126
| port | Redis port | string | `6379` | no |
127+
| replication_group_id | Replication group ID with the following constraints: A name must contain from 1 to 20 alphanumeric characters or hyphens. The first character must be a letter. A name cannot end with a hyphen or contain two consecutive hyphens. | string | `` | no |
112128
| security_groups | AWS security group ids | list | `<list>` | no |
113129
| stage | Stage | string | `default` | no |
114130
| subnets | AWS subnet ids | list | `<list>` | no |
@@ -135,26 +151,38 @@ Available targets:
135151

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

154+
[![README Commercial Support][readme_commercial_support_img]][readme_commercial_support_link]
155+
138156
## Commercial Support
139157

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

142160
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.
143161

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

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

154172

155-
## Community Forum
156173

157-
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.
174+
## Terraform Module Development
175+
176+
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.
177+
178+
179+
## Slack Community
180+
181+
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.
182+
183+
## Newsletter
184+
185+
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.
158186

159187
## Contributing
160188

@@ -164,7 +192,7 @@ Please use the [issue tracker](https://github.com/cloudposse/terraform-aws-elast
164192

165193
### Developing
166194

167-
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).
195+
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].
168196

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

@@ -179,7 +207,7 @@ In general, PRs are welcome. We follow the typical "fork-and-pull" Git workflow.
179207

180208
## Copyright
181209

182-
Copyright © 2017-2018 [Cloud Posse, LLC](https://cloudposse.com)
210+
Copyright © 2017-2018 [Cloud Posse, LLC](https://cpco.io/copyright)
183211

184212

185213

@@ -220,26 +248,16 @@ All other trademarks referenced herein are the property of their respective owne
220248

221249
## About
222250

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

225-
[![Cloud Posse](https://cloudposse.com/logo-300x69.svg)](https://cloudposse.com)
253+
[![Cloud Posse][logo]][website]
226254

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

229-
We offer paid support on all of our projects.
257+
We offer [paid support][commercial_support] on all of our projects.
230258

231-
Check out [our other projects][github], [apply for a job][jobs], or [hire us][hire] to help with your cloud strategy and implementation.
259+
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.
232260

233-
[docs]: https://docs.cloudposse.com/
234-
[website]: https://cloudposse.com/
235-
[github]: https://github.com/cloudposse/
236-
[commercial_support]: https://github.com/orgs/cloudposse/projects
237-
[jobs]: https://cloudposse.com/jobs/
238-
[hire]: https://cloudposse.com/contact/
239-
[slack]: https://slack.cloudposse.com/
240-
[linkedin]: https://www.linkedin.com/company/cloudposse
241-
[twitter]: https://twitter.com/cloudposse/
242-
[email]: mailto:hello@cloudposse.com
243261

244262

245263
### Contributors
@@ -261,3 +279,36 @@ Check out [our other projects][github], [apply for a job][jobs], or [hire us][hi
261279
[christopherriley_avatar]: https://github.com/christopherriley.png?size=150
262280

263281

282+
283+
[![README Footer][readme_footer_img]][readme_footer_link]
284+
[![Beacon][beacon]][website]
285+
286+
[logo]: https://cloudposse.com/logo-300x69.svg
287+
[docs]: https://cpco.io/docs
288+
[website]: https://cpco.io/homepage
289+
[github]: https://cpco.io/github
290+
[jobs]: https://cpco.io/jobs
291+
[hire]: https://cpco.io/hire
292+
[slack]: https://cpco.io/slack
293+
[linkedin]: https://cpco.io/linkedin
294+
[twitter]: https://cpco.io/twitter
295+
[testimonial]: https://cpco.io/leave-testimonial
296+
[newsletter]: https://cpco.io/newsletter
297+
[email]: https://cpco.io/email
298+
[commercial_support]: https://cpco.io/commercial-support
299+
[we_love_open_source]: https://cpco.io/we-love-open-source
300+
[module_development]: https://cpco.io/module-development
301+
[terraform_modules]: https://cpco.io/terraform-modules
302+
[readme_header_img]: https://cloudposse.com/readme/header/img?repo=cloudposse/terraform-aws-elasticache-redis
303+
[readme_header_link]: https://cloudposse.com/readme/header/link?repo=cloudposse/terraform-aws-elasticache-redis
304+
[readme_footer_img]: https://cloudposse.com/readme/footer/img?repo=cloudposse/terraform-aws-elasticache-redis
305+
[readme_footer_link]: https://cloudposse.com/readme/footer/link?repo=cloudposse/terraform-aws-elasticache-redis
306+
[readme_commercial_support_img]: https://cloudposse.com/readme/commercial-support/img?repo=cloudposse/terraform-aws-elasticache-redis
307+
[readme_commercial_support_link]: https://cloudposse.com/readme/commercial-support/link?repo=cloudposse/terraform-aws-elasticache-redis
308+
[share_twitter]: https://twitter.com/intent/tweet/?text=terraform-aws-elasticache-redis&url=https://github.com/cloudposse/terraform-aws-elasticache-redis
309+
[share_linkedin]: https://www.linkedin.com/shareArticle?mini=true&title=terraform-aws-elasticache-redis&url=https://github.com/cloudposse/terraform-aws-elasticache-redis
310+
[share_reddit]: https://reddit.com/submit/?url=https://github.com/cloudposse/terraform-aws-elasticache-redis
311+
[share_facebook]: https://facebook.com/sharer/sharer.php?u=https://github.com/cloudposse/terraform-aws-elasticache-redis
312+
[share_googleplus]: https://plus.google.com/share?url=https://github.com/cloudposse/terraform-aws-elasticache-redis
313+
[share_email]: mailto:?subject=terraform-aws-elasticache-redis&body=https://github.com/cloudposse/terraform-aws-elasticache-redis
314+
[beacon]: https://ga-beacon.cloudposse.com/UA-76589703-4/cloudposse/terraform-aws-elasticache-redis?pixel&cs=github&cm=readme&an=terraform-aws-elasticache-redis

docs/terraform.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
| notification_topic_arn | Notification topic arn | string | `` | no |
2525
| parameter | A list of Redis parameters to apply. Note that parameters may differ from one Redis family to another | list | `<list>` | no |
2626
| port | Redis port | string | `6379` | no |
27+
| replication_group_id | Replication group ID with the following constraints: A name must contain from 1 to 20 alphanumeric characters or hyphens. The first character must be a letter. A name cannot end with a hyphen or contain two consecutive hyphens. | string | `` | no |
2728
| security_groups | AWS security group ids | list | `<list>` | no |
2829
| stage | Stage | string | `default` | no |
2930
| subnets | AWS subnet ids | list | `<list>` | no |

main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ resource "aws_elasticache_replication_group" "default" {
5252
count = "${var.enabled == "true" ? 1 : 0}"
5353

5454
auth_token = "${var.auth_token}"
55-
replication_group_id = "${module.label.id}"
55+
replication_group_id = "${var.replication_group_id == "" ? module.label.id : var.replication_group_id}"
5656
replication_group_description = "${module.label.id}"
5757
node_type = "${var.instance_type}"
5858
number_cache_clusters = "${var.cluster_size}"

variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,3 +147,9 @@ variable "auth_token" {
147147
description = "Auth token for password protecting redis, transit_encryption_enabled must be set to 'true'! Password must be longer than 16 chars"
148148
default = ""
149149
}
150+
151+
variable "replication_group_id" {
152+
type = "string"
153+
description = "Replication group ID with the following constraints: \nA name must contain from 1 to 20 alphanumeric characters or hyphens. \n The first character must be a letter. \n A name cannot end with a hyphen or contain two consecutive hyphens."
154+
default = ""
155+
}

0 commit comments

Comments
 (0)