Skip to content

Commit

Permalink
azurerm_network_watcher_flow_log: set tags on updates (#27389)
Browse files Browse the repository at this point in the history
Signed-off-by: Jan-Otto Kröpke <[email protected]>
  • Loading branch information
jkroepke authored Oct 24, 2024
1 parent d954455 commit 5493c50
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ func resourceNetworkWatcherFlowLog() *pluginsdk.Resource {

"resource_group_name": commonschema.ResourceGroupName(),

//lintignore: S013
// lintignore: S013
"name": {
Type: pluginsdk.TypeString,
Required: true,
Expand Down Expand Up @@ -330,6 +330,10 @@ func resourceNetworkWatcherFlowLogUpdate(d *pluginsdk.ResourceData, meta interfa
}
}

if d.HasChange("tags") {
payload.Tags = tags.Expand(d.Get("tags").(map[string]interface{}))
}

if err := client.CreateOrUpdateThenPoll(ctx, *id, *payload); err != nil {
return fmt.Errorf("updating %s: %+v", id, err)
}
Expand Down

0 comments on commit 5493c50

Please sign in to comment.