Background Index Creation on SQL Server
This sounds a lot like the Automatic tuning features of Azure SQL Database.  In particular, one of the options is:


  CREATE INDEX - Identifies indexes that may improve performance of your workload, creates indexes, and automatically verifies that performance of queries has improved.


You can view these settings here:



You mentioned that you are on SQL Server 2017, though - so this doesn't apply to you per se.  

Is this a Managed Instance perhaps?  The docs currently state that automatic index management is not available in MI, but that may have changed from what I hear.



Since you are on an Azure VM, this won't be automatic index tuning.  You're best bet is to try and capture more information about this process by running the following sp_WhoIsActive command while this is occurring (something that was suggested in a similar Q&amp;A from several months ago):

EXEC sp_WhoIsActive @show_system_spids = 1;




In your particular case, it seems index creation was being rolled forward by the database startup/crash recovery process. You would have seen the database in a non-online state, and recovery progress messages in the error log.