I'm trying to automate Azure resource creation using out-of-the-box Terraform via Azure DevOps, but for some parts I need Powershell. That's fine, as there is this local-exec thing I can use.
The Powershell scripts work fine when I run them locally on Terraform, but running everything from Azure DevOps I get this login error: Run Connect-AzAccount to login
I have a DevOps service principal running the release definition, but it seems the context of the Terraform process is not propagated to the execution of the Powershell script?
I don't want to extract the Powershell stuff from the Terraform script, to run it as a separate DevOps task as this is one of the sequence steps of my deployment.
What can I do to make this work?