Skip to content

Commit

Permalink
determine if tag has changes
Browse files Browse the repository at this point in the history
Signed-off-by: ziyeqf <[email protected]>
  • Loading branch information
ziyeqf committed Sep 20, 2023
1 parent 95009cd commit 1f16a83
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -297,8 +297,10 @@ func (s LogAnalyticsSolutionResource) Update() sdk.ResourceFunc {
return fmt.Errorf("decoding %v", err)
}

payload := solution.SolutionPatch{
Tags: pointer.To(config.Tags),
payload := solution.SolutionPatch{}

if metadata.ResourceData.HasChange("tags") {
payload.Tags = pointer.To(config.Tags)
}

if err := client.UpdateThenPoll(ctx, *id, payload); err != nil {
Expand Down

0 comments on commit 1f16a83

Please sign in to comment.