Skip to content

Commit e8fe8a7

Browse files
committed
Add variable for agent auto updates
1 parent bec1756 commit e8fe8a7

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

main.tf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,10 @@ resource "aws_ecs_task_definition" "tfc_agent" {
7878
{
7979
name = "TFC_AGENT_LOG_LEVEL",
8080
value = var.agent_log_level
81+
},
82+
{
83+
name = "TFC_AGENT_AUTO_UPDATE",
84+
value = var.agent_auto_update
8185
}
8286
], var.extra_env_vars),
8387
secrets = [

variables.tf

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,16 @@ variable "agent_single_execution" {
4444
default = true
4545
}
4646

47+
variable "agent_auto_update" {
48+
type = string
49+
description = "Whether the agent should auto-update. Valid values are minor, patch, and disabled."
50+
default = "minor"
51+
validation {
52+
condition = contains(["minor", "patch", "disabled"], var.agent_auto_update)
53+
error_message = "Valid values: minor, patch, disabled"
54+
}
55+
}
56+
4757
variable "extra_env_vars" {
4858
type = list(object({
4959
name = string

0 commit comments

Comments
 (0)