From e3aee76a4477b2169f26bd42fedaea3a01840643 Mon Sep 17 00:00:00 2001 From: eddy-vera <122470243+eddy-vera@users.noreply.github.com> Date: Thu, 21 Nov 2024 14:09:09 +0100 Subject: [PATCH] fix: agent setting block is now fully optional (#74) --- modules/tasks/main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/tasks/main.tf b/modules/tasks/main.tf index 370b125..4407309 100644 --- a/modules/tasks/main.tf +++ b/modules/tasks/main.tf @@ -11,7 +11,7 @@ resource "azurerm_container_registry_task" "tasks" { tags = try(each.value.tags, var.tags, null) dynamic "agent_setting" { - for_each = each.value.agent_setting != null ? [each.value.agent_setting] : [] + for_each = try(each.value.agent_setting, null) != null ? [each.value.agent_setting] : [] content { cpu = try(agent_setting.value.cpu, 2) }