Skip to content

Commit

Permalink
fix d/azurerm_mssql_database id
Browse files Browse the repository at this point in the history
  • Loading branch information
Aris van Ommeren committed Oct 6, 2021
1 parent 080a1d5 commit 4356d6b
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions internal/services/mssql/mssql_database_data_source.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,7 @@ func dataSourceMsSqlDatabaseRead(d *pluginsdk.ResourceData, meta interface{}) er
return fmt.Errorf("making Read request on AzureRM Database %s (Resource Group %q, SQL Server %q): %+v", name, serverId.ResourceGroup, serverId.Name, err)
}

if id := resp.ID; id != nil {
d.SetId(*resp.ID)
}
d.SetId(parse.NewDatabaseID(serverId.SubscriptionId, serverId.ResourceGroup, serverId.Name, name).ID())
d.Set("name", name)
d.Set("server_id", mssqlServerId)

Expand Down

0 comments on commit 4356d6b

Please sign in to comment.