Skip to content

Commit fb19245

Browse files
Merge pull request #18 from depot/parameter-cloudwatch-retention
Make retention for cloudwatch logs an optional parameter
2 parents 4f663b7 + ca74fcd commit fb19245

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ resource "aws_iam_role" "cloud-agent" {
381381
resource "aws_cloudwatch_log_group" "connection" {
382382
count = var.create ? 1 : 0
383383
name = "depot-connection-${var.connection-id}"
384-
retention_in_days = 7
384+
retention_in_days = var.cloud-agent-log-retention
385385
}
386386

387387
resource "aws_ssm_parameter" "connection-token" {

variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,12 @@ variable "cloud-agent-version" {
2424
default = "2"
2525
}
2626

27+
variable "cloud-agent-log-retention" {
28+
type = number
29+
description = "Number of days to keep cloudwatch logs for the cloud-agent"
30+
default = 7
31+
}
32+
2733
variable "create" {
2834
type = bool
2935
description = "Controls if Depot connection resources should be created"

0 commit comments

Comments
 (0)