diff --git a/internal/services/mssql/mssql_job_agent_resource.go b/internal/services/mssql/mssql_job_agent_resource.go index e97cb11aef51..7602ff9c538e 100644 --- a/internal/services/mssql/mssql_job_agent_resource.go +++ b/internal/services/mssql/mssql_job_agent_resource.go @@ -11,6 +11,7 @@ import ( "github.com/hashicorp/go-azure-helpers/lang/response" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonids" "github.com/hashicorp/go-azure-helpers/resourcemanager/commonschema" + "github.com/hashicorp/go-azure-helpers/resourcemanager/location" "github.com/hashicorp/go-azure-helpers/resourcemanager/tags" "github.com/hashicorp/go-azure-sdk/resource-manager/sql/2023-08-01-preview/jobagents" "github.com/hashicorp/terraform-provider-azurerm/helpers/azure" @@ -132,14 +133,14 @@ func resourceMsSqlJobAgentRead(d *pluginsdk.ResourceData, meta interface{}) erro d.Set("name", id.JobAgentName) if model := resp.Model; model != nil { - d.Set("location", azure.NormalizeLocation(model.Location)) + d.Set("location", location.Normalize(model.Location)) if props := resp.Model.Properties; props != nil { d.Set("database_id", props.DatabaseId) } + return tags.FlattenAndSet(d, model.Tags) } - - return tags.FlattenAndSet(d, resp.Model.Tags) + return nil } func resourceMsSqlJobAgentDelete(d *pluginsdk.ResourceData, meta interface{}) error {