From 5493c50bc32a32bbc4d9122c23605e762d551075 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Otto=20Kr=C3=B6pke?= Date: Thu, 24 Oct 2024 13:14:13 +0000 Subject: [PATCH] azurerm_network_watcher_flow_log: set tags on updates (#27389) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jan-Otto Kröpke --- .../services/network/network_watcher_flow_log_resource.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/internal/services/network/network_watcher_flow_log_resource.go b/internal/services/network/network_watcher_flow_log_resource.go index b1af4492b3bc..d6d1fb5512ce 100644 --- a/internal/services/network/network_watcher_flow_log_resource.go +++ b/internal/services/network/network_watcher_flow_log_resource.go @@ -64,7 +64,7 @@ func resourceNetworkWatcherFlowLog() *pluginsdk.Resource { "resource_group_name": commonschema.ResourceGroupName(), - //lintignore: S013 + // lintignore: S013 "name": { Type: pluginsdk.TypeString, Required: true, @@ -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) }