In order for terraform to deploy resources to Azure, it has to be authenticated
Creating Application registration
In Azure portal click Azure Active Directory-App registration-New registration
Specify name,URL and click Register
After application is created,click App registrations – click on Application
Click on API permissions-Add a permission-Azure Service Management
Click user)impersonation and click Add permissions
Assigning a Role for Terraform App
Cost management+Billing-Subscriptions
Click on subscription ID-Access control (IAM)-Add
For role specify Contributor-Assign access to Azure AD user,group,or application-Select terraform application-Save
Get Azure Subscription ID
Cost management+Billing-Subscription-locate and copy Subscription ID to file
Get Client ID
Azure Active Directory-Application-registations-terraform application and click on it:
Get Tenant ID
Get Azure Client Secret
In the same windows, click Certificates & secrets
Click New client secret
Set name and validity period
Copy key to file
Get Object ID (needed when creating Azure Key vault)
Azure Active Directory-Enterprise applications-click on application and observe ObjectID