Skip to content

Latest commit

 

History

History
57 lines (45 loc) · 2.46 KB

Terraform-Challenge-00.md

File metadata and controls

57 lines (45 loc) · 2.46 KB

Challenge 0: Pre-requisites - Ready, Set, GO

Home - Next Challenge >

Introduction

A smart cloud architect always has the right tools in their toolbox.

Description

In this challenge, we'll be setting up all the tools we will need to complete our challenges.

Part 1: Pre-requisites

Part 2: Hello World

  1. Start VSCode and open a terminal window. Create a folder called 'hello-world' and cd into that folder.
  2. Run az login to login to your Azure subscription. You might be prompted to open a browser window to complete the login process.
  3. 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"
}
  1. Save the file as main.tf in the hello-world folder.
  2. In the terminal window, run terraform init to initialize the Terraform environment.
  3. Run terraform plan to see what Terraform will do.
  4. Run terraform apply to apply the changes. You will be prompted to confirm the changes. Type yes and press enter.
  5. Run terraform show to see the resources that were created.
  6. Run terraform destroy to destroy the resources. You will be prompted to confirm the changes. Type yes and press enter.

Success Criteria

  1. Your 'hello-world' deployment is successful.
  2. Visual Studio Code extensions are installed.