Skip to content

Commit

Permalink
Merge pull request #18 from depot/parameter-cloudwatch-retention
Browse files Browse the repository at this point in the history
Make retention for cloudwatch logs an optional parameter
  • Loading branch information
jacobwgillespie authored Nov 28, 2023
2 parents 4f663b7 + ca74fcd commit fb19245
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ resource "aws_iam_role" "cloud-agent" {
resource "aws_cloudwatch_log_group" "connection" {
count = var.create ? 1 : 0
name = "depot-connection-${var.connection-id}"
retention_in_days = 7
retention_in_days = var.cloud-agent-log-retention
}

resource "aws_ssm_parameter" "connection-token" {
Expand Down
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ variable "cloud-agent-version" {
default = "2"
}

variable "cloud-agent-log-retention" {
type = number
description = "Number of days to keep cloudwatch logs for the cloud-agent"
default = 7
}

variable "create" {
type = bool
description = "Controls if Depot connection resources should be created"
Expand Down

0 comments on commit fb19245

Please sign in to comment.