Infrastructure as a Service (quick test on Terraform)

I was recently testing Infrastructure as a Service (IaaS) through Terraform.

To be able to get a basic understanding of Terraform, I followed instructions in a book called Learning DevOps to try out a simple test they had outlined in the book.
Link to the book: https://www.packtpub.com/en-fi/product/learning devops-9781801818964

I found the test to be quite interesting, so I want to share the link to which the book had also instructed to go to look.
Link: https://github.com/PacktPublishing/Learning-DevOps-Second-Edition/tree/main/CHAP02/terraform_simple_script

First i had to install Terraform onto the PC.
During the test, I did have some trouble with naming conflicts and having to figure out some authentication mishaps, but after those were resolved it worked as intended.

Here is a picture i made of the setup

The Terraform script in the test creates various resources in Azure, e.g. VM (Virtual Machine) that is accessible from the internet.
There is actually a nice tool in Azure that lets one see the connections/dependencies of different resources. It’s called Resource Visualizer

A picture of the view Resource Visualizer showed me

The test’s execution was quite straightforward. I essentially just used the following four commands:
terraform init
terraform plan -out=terraform-run4.tfstate
terraform apply “terraform-run4.tfstate”
terraform destroy

In the future I have intentions of replicating a similar test to this one with Azure DevOps and Terraform.