Voiced by Amazon Polly |
Task 1: Create an Ubuntu VM in Azure:
- Sign in to the Azure Portal.
- Select the “Create a resource” option
- Select the “Virtual Machine” option
- Fill in details like resource group, VM name, region, authentication method (SSH key or password), and public IP and click on “Review and create”.
- Once click on “Create”, It asks for “Generate new key pair”.
- Click on “Download private key and create resource”.
-
- Now Go to resource and overview the configuration.
Start your career on Azure without leaving your job! Get Certified in less than a Month
- Experienced Authorized Instructor led Training
- Live Hands-on Labs
Task 2: Connect Ubuntu VM with PuTTY:
- Search for PuTTYgen software on your laptop. If not installed already, download and install the latest puTTYgen package from https://www.puttygen.com/. Open puTTYgen
- In PuTTYgen Configuration window, click Generate, and start moving the mouse within the Window
- Click the Load, to load private key (i.e terraform-server_key.pem)
- Click the “Save private key” and select “Yes” and save >ppk file with new name (i.e terraform-server_key.ppk)
- Close the window and Search for PuTTY software on your laptop. If not installed already, download and install the latest putty package from https://www.putty.org/. Open puTTY
- In PuTTY Configuration window, Paste your Public IP or Public DNS in the Hostname (or IP Address) field.
- Then expand the SSH section and select Auth, click on the Browse button to select your downloaded private key file, and click on open
- Click Accept on the PuTTY Security Alert window
- Login as the ubuntu user
Task 3: Install Terraform on Azure VM:
- Follow the below steps to install Terraform.
1 2 3 4 5 6 7 8 9 10 11 12 |
# Update packages $ sudo apt update # Download and install Terraform $ wget -O- https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg $ echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list $ sudo apt update && sudo apt install terraform -y |
- Once Terraform is installed, verify the version.
1 |
$ terraform version |
- Now install Azure CLI and Authenticate Azure account
1 |
$ curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash |
1 |
$ az login |
To sign in, use a web browser to open the page https://microsoft.com/devicelogin and enter the code E2CFEUZNG to authenticate.
**click on link to open it in browser and paste code written here to authenticate
- Verify Azure CLI Installation
1 2 3 |
az group list -o table az vm list -o table |
You have successfully created an Ubuntu VM on Azure, connected to it using PuTTY, and installed Terraform along with the Azure CLI. You can now use this setup to manage your infrastructure with Terraform and Azure. Happy automating!
Learn from Industry Certified DevOps Experts and Become a Certified DevOps Professional with a High Paying Job
- Experienced Authorized Instructor led Training
- Live Hands-on Labs
About CloudThat
CloudThat is an award-winning company and the first in India to offer cloud training and consulting services worldwide. As a Microsoft Solutions Partner, AWS Advanced Tier Training Partner, and Google Cloud Platform Partner, CloudThat has empowered over 850,000 professionals through 600+ cloud certifications winning global recognition for its training excellence including 20 MCT Trainers in Microsoft’s Global Top 100 and an impressive 12 awards in the last 8 years. CloudThat specializes in Cloud Migration, Data Platforms, DevOps, IoT, and cutting-edge technologies like Gen AI & AI/ML. It has delivered over 500 consulting projects for 250+ organizations in 30+ countries as it continues to empower professionals and enterprises to thrive in the digital-first world.

WRITTEN BY Sirin Kausar Isak Ali
Comments