Skip to content

Commit

Permalink
Updating the state properly for the update method
Browse files Browse the repository at this point in the history
  • Loading branch information
CerealBoy committed Dec 20, 2024
1 parent 1d3b9aa commit 97e4e99
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions buildkite/resource_cluster_queue.go
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,15 @@ func (cq *clusterQueueResource) Update(ctx context.Context, req resource.UpdateR
}

state.Description = types.StringPointerValue(r.ClusterQueueUpdate.ClusterQueue.Description)
if state.HostedAgents != nil {
state.HostedAgents.InstanceShape = types.StringValue(string(r.ClusterQueueUpdate.ClusterQueue.HostedAgents.InstanceShape.Name))
if state.HostedAgents.Mac != nil {
state.HostedAgents.Mac.XcodeVersion = types.StringValue(r.ClusterQueueUpdate.ClusterQueue.HostedAgents.PlatformSettings.Macos.XcodeVersion)
}
if state.HostedAgents.Linux != nil {
state.HostedAgents.Linux.ImageAgentRef = types.StringValue(r.ClusterQueueUpdate.ClusterQueue.HostedAgents.PlatformSettings.Linux.AgentImageRef)
}
}

resp.Diagnostics.Append(resp.State.Set(ctx, &state)...)
}
Expand Down

0 comments on commit 97e4e99

Please sign in to comment.