From f6827f218f16691961dfc53ca53a83091bb9bb02 Mon Sep 17 00:00:00 2001 From: Domenic Simone Date: Thu, 19 Oct 2023 17:08:33 +1100 Subject: [PATCH] chore: patch --- octopusdeploy/schema_action_run_kubectl_script.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/octopusdeploy/schema_action_run_kubectl_script.go b/octopusdeploy/schema_action_run_kubectl_script.go index bf41d6d64..edcf15caa 100644 --- a/octopusdeploy/schema_action_run_kubectl_script.go +++ b/octopusdeploy/schema_action_run_kubectl_script.go @@ -30,13 +30,21 @@ func expandRunKubectlScriptAction(flattenedAction map[string]interface{}) *deplo } func flattenKubernetesRunScriptAction(action *deployments.DeploymentAction) map[string]interface{} { - flattenedAction := flattenDeploymentAction(action) + flattenedAction := flattenAction(action) if v, ok := action.Properties["Octopus.Action.RunOnServer"]; ok { runOnServer, _ := strconv.ParseBool(v.Value) flattenedAction["run_on_server"] = runOnServer } + if len(action.WorkerPool) > 0 { + flattenedAction["worker_pool_id"] = action.WorkerPool + } + + if len(action.WorkerPoolVariable) > 0 { + flattenedAction["worker_pool_variable"] = action.WorkerPoolVariable + } + if v, ok := action.Properties["Octopus.Action.Script.ScriptFileName"]; ok { flattenedAction["script_file_name"] = v.Value }