Re-generate TF config


I had a question- If we required to just modify a tag or small changes on the existing Azure VM which was created via TF.

why can’t we regenerate TF configuration with help of azure VM resource ID…? instead searching for the code which we used initially to deploy.

VM resource ID = /subscriptions/0000000-9fda-476c-b5c8-000000000000/resourceGroups/app-grp/providers/Microsoft.Compute/virtualMachines/T4117