diff --git a/internal/services/bot/bot_service_azure_bot_resource_test.go b/internal/services/bot/bot_service_azure_bot_resource_test.go index 33682627fc25..65ffc5343ae0 100644 --- a/internal/services/bot/bot_service_azure_bot_resource_test.go +++ b/internal/services/bot/bot_service_azure_bot_resource_test.go @@ -196,7 +196,7 @@ resource "azurerm_bot_service_azure_bot" "test" { developer_app_insights_application_id = azurerm_application_insights.test.app_id tags = { - environment = "test" + environment = "test2" } } `, data.RandomInteger, data.Locations.Primary) diff --git a/internal/services/bot/bot_service_resource_base.go b/internal/services/bot/bot_service_resource_base.go index e5bf53aca3c5..a37e5e6952bd 100644 --- a/internal/services/bot/bot_service_resource_base.go +++ b/internal/services/bot/bot_service_resource_base.go @@ -300,6 +300,10 @@ func (br botBaseResource) updateFunc() sdk.ResourceFunc { existing.Properties.IconURL = utils.String(metadata.ResourceData.Get("icon_url").(string)) } + if metadata.ResourceData.HasChange("tags") { + existing.Tags = tags.Expand(metadata.ResourceData.Get("tags").(map[string]interface{})) + } + if _, err := client.Update(ctx, id.ResourceGroup, id.Name, existing); err != nil { return fmt.Errorf("updating %s: %+v", *id, err) }