Skip to content

Commit 5b8c3ff

Browse files
committed
fix: Agent plugin config dynamic values
Signed-off-by: Devon Crouse <devon.crouse@oracle.com>
1 parent 9cc7db8 commit 5b8c3ff

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

modules/workers/instance.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ resource "oci_core_instance" "workers" {
5252
dynamic "plugins_config" {
5353
for_each = each.value.agent_config.plugins_config
5454
content {
55-
name = each.key
56-
desired_state = each.value
55+
name = plugins_config.key
56+
desired_state = plugins_config.value
5757
}
5858
}
5959
}

modules/workers/instanceconfig.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ resource "oci_core_instance_configuration" "workers" {
2020
dynamic "plugins_config" {
2121
for_each = each.value.agent_config.plugins_config
2222
content {
23-
name = each.key
24-
desired_state = each.value
23+
name = plugins_config.key
24+
desired_state = plugins_config.value
2525
}
2626
}
2727
}

modules/workers/locals.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,8 @@ locals {
9191
}
9292
]
9393

94+
agent_config = coalesce(var.agent_config, pool.agent_config, local.worker_pool_defaults.agent_config)
95+
9496
# Translate configured + available AD numbers e.g. 2 into tenancy/compartment-specific names
9597
availability_domains = compact([for ad_number in tolist(setintersection(pool.placement_ads, var.ad_numbers)) :
9698
lookup(var.ad_numbers_to_names, ad_number, null)

modules/workers/variables.tf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,6 @@ variable "platform_config" {
304304
}
305305

306306
variable "agent_config" {
307-
default = null
308307
description = "Default agent_config for self-managed worker pools created with mode: 'instance', 'instance-pool', or 'cluster-network'. See <a href=https://docs.oracle.com/en-us/iaas/api/#/en/iaas/20160918/datatypes/InstanceAgentConfig for more information."
309308
type = object({
310309
are_all_plugins_disabled = bool,

0 commit comments

Comments
 (0)