Skip to content

Commit

Permalink
fix: missing worker id on deploy_kubernetes_secret_action
Browse files Browse the repository at this point in the history
  • Loading branch information
domenicsim1 committed Oct 19, 2023
1 parent f6827f2 commit 5c75d8a
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions octopusdeploy/schema_action_deploy_kubernetes_secret.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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,
Expand Down

0 comments on commit 5c75d8a

Please sign in to comment.