Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

azurerm_bot_service_azure_bot - support to update tags #24332

Merged
merged 1 commit into from
Jan 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 4 additions & 0 deletions internal/services/bot/bot_service_resource_base.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down
Loading