A smart cloud architect always has the right tools in their toolbox.
In this challenge, we'll be setting up all the tools we will need to complete our challenges.
Part 1: Pre-requisites
- Install the recommended toolset:
Part 2: Hello World
- Start VSCode and open a terminal window. Create a folder called 'hello-world' and cd into that folder.
- Run
az login
to login to your Azure subscription. You might be prompted to open a browser window to complete the login process. - Open a new window in VSCode, and paste the following code into it: (We're not going to explain this code yet, but we will in the next challenge. The purpose of this exercise is to validate that your tools are all working)
terraform {
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = ">=3.0.0"
}
}
}
provider "azurerm" {
features {}
}
resource "azurerm_resource_group" "rg" {
name = "hello-world" // change this if needed
location = "eastus"
}
- Save the file as
main.tf
in thehello-world
folder. - In the terminal window, run
terraform init
to initialize the Terraform environment. - Run
terraform plan
to see what Terraform will do. - Run
terraform apply
to apply the changes. You will be prompted to confirm the changes. Typeyes
and press enter. - Run
terraform show
to see the resources that were created. - Run
terraform destroy
to destroy the resources. You will be prompted to confirm the changes. Typeyes
and press enter.
- Your 'hello-world' deployment is successful.
- Visual Studio Code extensions are installed.