From 55fda33f713c4efa1eb8f52e255dab731addd869 Mon Sep 17 00:00:00 2001 From: Susan Pan Date: Wed, 30 Oct 2024 12:46:09 +1000 Subject: [PATCH] fix: respect machine policy id in kubernetes agent worker --- octopusdeploy/schema_kubernetes_agent_worker.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/octopusdeploy/schema_kubernetes_agent_worker.go b/octopusdeploy/schema_kubernetes_agent_worker.go index 8c6f1e753..32c0c6e20 100644 --- a/octopusdeploy/schema_kubernetes_agent_worker.go +++ b/octopusdeploy/schema_kubernetes_agent_worker.go @@ -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 { @@ -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 }