Commit fcb15042 authored by Erik Osterman's avatar Erik Osterman Committed by GitHub

Add working example (#17)

* Add working example

* fix regression

* Link to example

* fix formatting
parent b5c789a6
......@@ -55,6 +55,10 @@ module "example_redis" {
## Examples
Review the [complete example](examples/simple) to see how to use this module.
## Makefile Targets
......@@ -88,7 +92,7 @@ Available targets:
| maintenance_window | Maintenance window | string | `wed:03:00-wed:04:00` | no |
| name | Name | string | `redis` | no |
| namespace | Namespace | string | `global` | no |
| notification_topic_arn | Notification topic arn | string | `10000000` | no |
| notification_topic_arn | Notification topic arn | string | `` | no |
| port | Redis port | string | `6379` | no |
| security_groups | AWS security group ids | list | `<list>` | no |
| stage | Stage | string | `default` | no |
......
......@@ -60,6 +60,8 @@ usage: |-
}
```
examples: |-
Review the [complete example](examples/simple) to see how to use this module.
include:
- "docs/targets.md"
......@@ -78,4 +80,4 @@ contributors:
- name: "Max Moon"
github: "MoonMoon1919"
- name: "Christopher Riley"
github: "christopherriley"
\ No newline at end of file
github: "christopherriley"
......@@ -20,7 +20,7 @@
| maintenance_window | Maintenance window | string | `wed:03:00-wed:04:00` | no |
| name | Name | string | `redis` | no |
| namespace | Namespace | string | `global` | no |
| notification_topic_arn | Notification topic arn | string | `10000000` | no |
| notification_topic_arn | Notification topic arn | string | `` | no |
| port | Redis port | string | `6379` | no |
| security_groups | AWS security group ids | list | `<list>` | no |
| stage | Stage | string | `default` | no |
......
terraform {
required_version = ">= 0.11.2"
backend "s3" {}
}
variable "aws_assume_role_arn" {}
provider "aws" {
assume_role {
role_arn = "${var.aws_assume_role_arn}"
}
}
variable "namespace" {}
variable "name" {}
variable "stage" {}
variable "region" {}
variable "availability_zones" {
type = "list"
}
variable "zone_id" {}
module "vpc" {
source = "git::https://github.com/cloudposse/terraform-aws-vpc.git?ref=tags/0.3.3"
namespace = "${var.namespace}"
stage = "${var.stage}"
name = "${var.name}"
}
module "subnets" {
source = "git::https://github.com/cloudposse/terraform-aws-dynamic-subnets.git?ref=tags/0.3.5"
namespace = "${var.namespace}"
stage = "${var.stage}"
name = "${var.name}"
region = "${var.region}"
availability_zones = "${var.availability_zones}"
vpc_id = "${module.vpc.vpc_id}"
igw_id = "${module.vpc.igw_id}"
cidr_block = "10.0.0.0/16"
}
module "redis" {
source = "../../"
namespace = "${var.namespace}"
stage = "${var.stage}"
name = "${var.name}"
zone_id = "${var.zone_id}"
vpc_id = "${module.vpc.vpc_id}"
subnets = "${module.subnets.private_subnet_ids}"
maintenance_window = "wed:03:00-wed:04:00"
cluster_size = "2"
instance_type = "cache.t2.micro"
apply_immediately = "true"
availability_zones = "${var.availability_zones}"
automatic_failover = "false"
engine_version = "4.0.10"
family = "redis4.0"
port = "6379"
alarm_cpu_threshold_percent = "75"
alarm_memory_threshold_bytes = "10000000"
at_rest_encryption_enabled = "true"
}
namespace = "eg"
name = "redis"
stage = "testing"
zone_id = "Z3SO0TKDDQ0RGG"
region = "us-west-2"
availability_zones = ["us-west-2a", "us-west-2b"]
......@@ -76,7 +76,7 @@ variable "transit_encryption_enabled" {
}
variable "notification_topic_arn" {
default = "10000000"
default = ""
description = "Notification topic arn"
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment