Last active
June 3, 2021 09:11
-
-
Save moiaune/943f2124375625700f00dbe2f150c28b to your computer and use it in GitHub Desktop.
List azurerm/azuread resources in Terraform project
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(Get-ChildItem -File -Recurse | Get-Content | Select-String -Pattern 'resource "(azurerm_.+|azuread_.+)" ".*"' -AllMatches).Matches | | |
ForEach-Object { $_.Groups[1].Value } | | |
Sort-Object -Unique |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment