Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix tags #7

Merged
merged 3 commits into from
Oct 21, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 25 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,28 +34,31 @@ module "example_redis" {

## Input

| Name | Default | Description |
|:-----------------------------|:-------------------:|:-------------------------------------------------------|
| namespace |global |Namespace |
| stage |default |Stage |
| name |redis |Name |
| security_groups |[] |AWS security group ids |
| vpc_id |__REQUIRED__ |AWS VPC id |
| subnets | [] | AWS subnet ids |
| cluster_size | 1 | Count of nodes in cluster |
| instance_type | cache.t2.micro | Elastic cache instance type |
| family | redis3.2 | Redis family |
| engine_version | 3.2.4 | Redis engine version |
| port | 6379 | Redis port |
| maintenance_window | wed:03:00-wed:04:00 | Maintenance window |
| notification_topic_arn | | Notification topic arn |
| alarm_cpu_threshold_percent | 75 | CPU threshold alarm level |
| alarm_memory_threshold_bytes | 10000000 | Ram threshold alarm level |
| alarm_actions | [] | Alarm action list |
| apply_immediately | true | Apply changes immediately |
| automatic_failover | false | Automatic failover (Not available for T1/T2 instances) |
| availability_zones | [] | Availability zone ids |
| zone_id | false | Route53 dns zone id |
| Name | Default | Description |
|:-----------------------------|:-------------------:|:----------------------------------------------------------------|
| namespace | global | Namespace |
| stage | default | Stage |
| name | redis | Name |
| security_groups | [] | AWS security group ids |
| vpc_id | __REQUIRED__ | AWS VPC id |
| subnets | [] | AWS subnet ids |
| cluster_size | 1 | Count of nodes in cluster |
| instance_type | cache.t2.micro | Elastic cache instance type |
| family | redis3.2 | Redis family |
| engine_version | 3.2.4 | Redis engine version |
| port | 6379 | Redis port |
| maintenance_window | wed:03:00-wed:04:00 | Maintenance window |
| notification_topic_arn | | Notification topic arn |
| alarm_cpu_threshold_percent | 75 | CPU threshold alarm level |
| alarm_memory_threshold_bytes | 10000000 | Ram threshold alarm level |
| alarm_actions | [] | Alarm action list |
| apply_immediately | true | Apply changes immediately |
| automatic_failover | false | Automatic failover (Not available for T1/T2 instances) |
| availability_zones | [] | Availability zone ids |
| zone_id | false | Route53 DNS Zone id |
| attributes | [] | Additional attributes (_e.g._ "1") |
| tags | {} | Additional tags (_e.g._ map("BusinessUnit","ABC") |
| delimiter | - | Delimiter between `name`, `namespace`, `stage` and `attributes` |


## Output
Expand Down
4 changes: 1 addition & 3 deletions main.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Define composite variables for resources
module "label" {
source = "git::https://github.com/cloudposse/terraform-null-label.git?ref=tags/0.2.1"
source = "git::https://github.com/cloudposse/terraform-null-label.git?ref=tags/0.2.2"
namespace = "${var.namespace}"
name = "${var.name}"
stage = "${var.stage}"
Expand Down Expand Up @@ -81,7 +81,6 @@ resource "aws_cloudwatch_metric_alarm" "cache_cpu" {

alarm_actions = ["${var.alarm_actions}"]
depends_on = ["aws_elasticache_replication_group.default"]
tags = "${module.label.tags}"
}

resource "aws_cloudwatch_metric_alarm" "cache_memory" {
Expand All @@ -102,7 +101,6 @@ resource "aws_cloudwatch_metric_alarm" "cache_memory" {

alarm_actions = ["${var.alarm_actions}"]
depends_on = ["aws_elasticache_replication_group.default"]
tags = "${module.label.tags}"
}

module "dns" {
Expand Down