- I want to create a python script utilizing the Terraform VM deployment on Azure (It's an educational project - so no real reasoning behind this, but all should be done with a single script)
- I have successfully created VM using Azure CLI and Terraform
az login
terraform init
terraform validate
terraform apply
- The problem is
az login
use browser authentication, which is not allowed by an educational project (single .py script without any user interaction). Azure CLI can use login and password though (doesn't work with two-factor authentication enabled)
az login -u <username> -p <password>
It can be somewhat done, with a username and password, but it's barely ideal - to share your Microsoft account with teammates and utilize credentials in python script instead of a token.
How would you suggest granting my teammates and terraform access to Azure and therefore creating a deployment script which uses some external token-like file? (Managed identities for Azure resources can be used to authenticate to services that support Azure Active Directory authentication but I have no idea what is this about)