Skip to content

Commit

Permalink
fix: respect machine policy id in kubernetes agent worker
Browse files Browse the repository at this point in the history
  • Loading branch information
susanpann committed Oct 30, 2024
1 parent c1ef33e commit 55fda33
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion octopusdeploy/schema_kubernetes_agent_worker.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
package octopusdeploy

import (
"net/url"

"github.com/OctopusDeploy/go-octopusdeploy/v2/pkg/machines"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation"
"net/url"
)

func expandKubernetesAgentWorker(kubernetesAgent *schema.ResourceData) *machines.Worker {
Expand All @@ -24,6 +25,8 @@ func expandKubernetesAgentWorker(kubernetesAgent *schema.ResourceData) *machines

Worker.SpaceID = kubernetesAgent.Get("space_id").(string)

Worker.MachinePolicyID = kubernetesAgent.Get("machine_policy_id").(string)

return Worker
}

Expand Down

0 comments on commit 55fda33

Please sign in to comment.