This is some sample code to show how to extra outputs from Terraform and, using PowerShell, store them as variables in Azure DevOps Pipelines.
More information is in this blog post: https://blog.davesdomain.co.uk/posts/capturing-terraform-outputs-in-azure-devops/