Hii YogiBear
Welcome to the Microsoft Q&A Platform! Thank you for asking your question here.
The Azure Export Tool helps you export Azure resources to Terraform configurations. It mainly works with resource groups but can also handle policies.
Use the Azure Export Tool to save your policy definitions and initiatives as Terraform files.
Run the command az policy definition list to see your existing policy definitions.
Begin by creating Terraform configuration files for each policy definition and initiative using azurerm_policy_definition.
https://medium.com/@yusufkaratoprak/azure-security-via-policy-rules-e292806ba5fc
Once you've defined them, use Terraform to apply the configurations, so they match what you want.
If you have any further queries, do let us know.
If the answer is helpful, please click "Accept Answer" and "Upvote it".