Configuring Terraform for Azure

Posted: January 22, 2018 in Azure, terraform

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

app_registration

Specify name,URL and click Register

app_registration1

After application is created,click App registrations – click on Application

app_registration2

Click on API permissions-Add a permission-Azure Service Management

app_registration3

Click user)impersonation and click Add permissions

app_registration4

Assigning a Role for Terraform App

Cost management+Billing-Subscriptions

8.png

Click on subscription ID-Access control (IAM)-Add

app_registration5

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

11.png

Get Client ID

Azure Active Directory-Application-registations-terraform application and click on it:

app_registration6

app_id

Get Tenant ID

tenant_id

Get Azure Client Secret

In the same windows, click Certificates & secrets

get_secret1

Click New client secret

get_secret2

Set name and validity period

get_secret3

Copy key to file

get_secret4

Get Object ID (needed when creating Azure Key vault)

Azure Active Directory-Enterprise applications-click on application and observe ObjectID

object_id

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s