Skip to content

Latest commit

 

History

History
42 lines (29 loc) · 2.24 KB

Terraform-Challenge-05.md

File metadata and controls

42 lines (29 loc) · 2.24 KB

Challenge 5 - Deploy a Virtual Machine

< Previous Challenge - Home - Next Challenge >

Introduction

In this challenge, you will put all the pieces together and extend your Terraform manifests to deploy a Virtual Machine in Azure.

The goals for this challenge include understanding:

  • Globally unique naming context and complex dependencies
  • Clean code with neat parameter and variable values
  • Figuring out what Azure resources it takes to build a VM

Challenge

  • Extend your Terraform to deploy a virtual machine:
    • VM requirements:
      • Linux OS
      • Have terraform generate an SSH key and pass the public key to the VM. Store the private ssh key in the keyvault.
        • Extra credit: write your ssh private key to a local file
    • Use a resource prefix and template variables to have consistent naming of resources.

Success Criteria

  1. Verify that your virtual machine has been deployed via the Azure Portal or Azure CLI.
  2. Connect to your virtual machine and verify you can login (Linux with SSH). (You will need to grab the ssh private key from the keyvault)

Tips

  • It's up to you if you want to start with clean slate set of manifests or if you want to extend your current manifests to include a VM.
  • Note that you will need to create a VNET, subnet, and NIC in addition to your VM.
  • You will need to use the Azure Bastion service to connect to your VM.

Learning Resources