Skip to content

Commit

Permalink
add auth token generation to readme
Browse files Browse the repository at this point in the history
  • Loading branch information
MoonMoon1919 committed Oct 6, 2018
1 parent 68026d9 commit 875d6b2
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@ It's 100% Open Source and licensed under the [APACHE2](LICENSE).
Include this repository as a module in your existing terraform code:

```hcl
// Generate a random string for auth token, no special chars
resource "random_string" "auth_token" {
length = 64
special = false
}
module "example_redis" {
source = "git::https://github.com/cloudposse/terraform-aws-elasticache-redis.git?ref=master"
namespace = "general"
Expand All @@ -38,7 +44,7 @@ module "example_redis" {
zone_id = "${var.route53_zone_id}"
security_groups = ["${var.security_group_id}"]
auth_token = "${var.auth_token}"
auth_token = "${random_string.auth_token.result}"
vpc_id = "${var.vpc_id}"
subnets = "${var.private_subnets}"
maintenance_window = "wed:03:00-wed:04:00"
Expand All @@ -52,6 +58,10 @@ module "example_redis" {
automatic_failover = "false"
}
output "auth_token" {
value = "${random_string.auth_token.result}"
}
```


Expand Down
12 changes: 11 additions & 1 deletion README.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@ usage: |-
Include this repository as a module in your existing terraform code:
```hcl
// Generate a random string for auth token, no special chars
resource "random_string" "auth_token" {
length = 64
special = false
}
module "example_redis" {
source = "git::https://github.com/cloudposse/terraform-aws-elasticache-redis.git?ref=master"
namespace = "general"
Expand All @@ -45,7 +51,7 @@ usage: |-
zone_id = "${var.route53_zone_id}"
security_groups = ["${var.security_group_id}"]
auth_token = "${var.auth_token}"
auth_token = "${random_string.auth_token.result}"
vpc_id = "${var.vpc_id}"
subnets = "${var.private_subnets}"
maintenance_window = "wed:03:00-wed:04:00"
Expand All @@ -59,6 +65,10 @@ usage: |-
automatic_failover = "false"
}
output "auth_token" {
value = "${random_string.auth_token.result}"
}
```
examples: |-
Expand Down

0 comments on commit 875d6b2

Please sign in to comment.