Skip to content

Commit

Permalink
Merge pull request #46 from DNXLabs/feat/container-insights
Browse files Browse the repository at this point in the history
Add container insights capability
  • Loading branch information
lzrocha committed Jan 21, 2023
2 parents cdfadfe + 39d5c7f commit 6a441b0
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ module "ecs_apps" {
| backup | Assing a backup tag to efs resource - Backup will be performed by AWS Backup. | `string` | `"true"` | no |
| certificate\_arn | n/a | `any` | n/a | yes |
| certificate\_internal\_arn | certificate arn for internal ALB. | `string` | `""` | no |
| container\_insights | Enables CloudWatch Container Insights for a cluster. | `bool` | `false` | no |
| create\_efs | Enables creation of EFS volume for cluster | `bool` | `true` | no |
| create\_iam\_service\_linked\_role | Create iam\_service\_linked\_role for ECS or not. | `bool` | `false` | no |
| ebs\_key\_arn | ARN of a KMS Key to use on EBS volumes | `string` | `""` | no |
Expand Down
6 changes: 6 additions & 0 deletions _variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -360,4 +360,10 @@ variable "extra_task_policies_arn" {
type = list(string)
default = []
description = "Extra policies to add to the task definition permissions"
}

variable "container_insights" {
type = bool
default = false
description = "Enables CloudWatch Container Insights for a cluster."
}
5 changes: 5 additions & 0 deletions ecs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ resource "aws_ecs_cluster" "ecs" {
"FARGATE_SPOT"
])

setting {
name = "containerInsights"
value = var.container_insights ? "enabled" : "disabled"
}

lifecycle {
ignore_changes = [
tags
Expand Down

0 comments on commit 6a441b0

Please sign in to comment.