Skip to content

Commit d065576

Browse files
authored
Feature/encrypt logs (#8)
* doh! * allow toggling of loadbalancing * remove healthcheck grace period when not load balanced * enable encryption of logs
1 parent a18f436 commit d065576

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ Module managed by [Marcin Cuber](https://github.com/marcincuber) [LinkedIn](http
9090
| task\_host\_port | The port number on the container instance to reserve for your container. | number | `"0"` | no |
9191
| target\_group\_name | The name for the tasks target group. | string | `""` | no |
9292
| load\_balanced | Whether the task should be loadbalanced. | bool | `true` | no |
93+
| logs_kms_key | The KMS key ARN to use to encrypt container logs. | string | `""` | no |
9394

9495
## Outputs
9596

main.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
resource "aws_cloudwatch_log_group" "main" {
55
name = var.name_prefix
66
retention_in_days = var.log_retention_in_days
7+
8+
kms_key_id = var.logs_kms_key
79
tags = var.tags
810
}
911

variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,3 +164,9 @@ variable "load_balanced" {
164164
default = true
165165
description = "Whether the task should be loadbalanced."
166166
}
167+
168+
variable "logs_kms_key" {
169+
type = string
170+
description = "The KMS key ARN to use to encrypt container logs."
171+
default = ""
172+
}

0 commit comments

Comments
 (0)