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

Add container insights #46

Merged
merged 3 commits into from
Jan 21, 2023
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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
lzrocha marked this conversation as resolved.
Show resolved Hide resolved
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