Skip to content
This repository has been archived by the owner on Feb 11, 2020. It is now read-only.

Commit

Permalink
make log_group_name_prefix variable (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
kenoir authored Dec 5, 2017
1 parent 547ddfb commit 6c3c4a0
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 4 deletions.
2 changes: 1 addition & 1 deletion ecs_script_task/cloudwatch.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
resource "aws_cloudwatch_log_group" "task" {
name = "platform/${var.task_name}"
name = "${var.log_group_name_prefix}/${var.task_name}"
}
5 changes: 5 additions & 0 deletions ecs_script_task/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,8 @@ variable "name" {
description = "Name of container in task description"
default = "app"
}

variable "log_group_name_prefix" {
description = "Cloudwatch log group name prexix"
default = "platform"
}
4 changes: 2 additions & 2 deletions services/ecs_tasks/cloudwatch.tf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
resource "aws_cloudwatch_log_group" "task" {
name = "platform/${var.task_name}"
name = "${var.log_group_name_prefix}/${var.task_name}"
}

resource "aws_cloudwatch_log_group" "nginx_task" {
name = "platform/nginx_${var.task_name}"
name = "${var.log_group_name_prefix}/nginx_${var.task_name}"
}
4 changes: 4 additions & 0 deletions services/ecs_tasks/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,7 @@ variable "memory" {
variable "cpu" {
description = "How much CPU to allocate to the app"
}

variable "log_group_name_prefix" {
description = "Cloudwatch log group name prexix"
}
5 changes: 5 additions & 0 deletions services/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -161,3 +161,8 @@ variable "config_template_path" {
variable "https_domain" {
default = ""
}

variable "log_group_name_prefix" {
description = "Cloudwatch log group name prexix"
default = "platform"
}
2 changes: 1 addition & 1 deletion userdata/cloudwatch.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
resource "aws_cloudwatch_log_group" "ecs_agent" {
name = "platform/ecs-agent-${var.cluster_name}"
name = "${var.log_group_name_prefix}/ecs-agent-${var.cluster_name}"
}
5 changes: 5 additions & 0 deletions userdata/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,8 @@ variable "ebs_cache_max_age_days" {
variable "ebs_cache_max_size" {
default = ""
}

variable "log_group_name_prefix" {
description = "Cloudwatch log group name prexix"
default = "platform"
}

0 comments on commit 6c3c4a0

Please sign in to comment.