Hi @Amjad Nagori ,
I haven't tried this by myself. But maybe it helps to get started:
https://thegrayzone.co.uk/blog/2017/03/external-terraform-provider-powershell/
The stdout
of the PowerShell could be done like this:
Write-Output $env:USER
----------
(If the reply was helpful please don't forget to upvote and/or accept as answer, thank you)
Regards
Andreas Baumgarten