From 5c75d8a4bd07ace35942c74810d65fae398b0e94 Mon Sep 17 00:00:00 2001 From: Domenic Simone Date: Thu, 19 Oct 2023 21:09:54 +1100 Subject: [PATCH] fix: missing worker id on deploy_kubernetes_secret_action --- .../schema_action_deploy_kubernetes_secret.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/octopusdeploy/schema_action_deploy_kubernetes_secret.go b/octopusdeploy/schema_action_deploy_kubernetes_secret.go index 85718f9a2..83629dea6 100644 --- a/octopusdeploy/schema_action_deploy_kubernetes_secret.go +++ b/octopusdeploy/schema_action_deploy_kubernetes_secret.go @@ -37,6 +37,14 @@ func flattenDeployKubernetesSecretAction(action *deployments.DeploymentAction) m flattenedAction["secret_name"] = v.Value } + 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.KubernetesContainers.SecretValues"]; ok { var secretKeyValues map[string]string json.Unmarshal([]byte(v.Value), &secretKeyValues) @@ -50,6 +58,8 @@ func flattenDeployKubernetesSecretAction(action *deployments.DeploymentAction) m func getDeployKubernetesSecretActionSchema() *schema.Schema { actionSchema, element := getActionSchema() addExecutionLocationSchema(element) + addWorkerPoolSchema(element) + addWorkerPoolVariableSchema(element) element.Schema["secret_name"] = &schema.Schema{ Description: "The name of the secret resource", Required: true,