Skip to content

Latest commit

 

History

History
24 lines (14 loc) · 1.41 KB

Terraform-Challenge-03.md

File metadata and controls

24 lines (14 loc) · 1.41 KB

Challenge 3 - Advanced resource declarations

< Previous Challenge - Home - Next Challenge >

Introduction

The goals for this challenge include understanding:

  • How to create a set of resources based on a list or count (loops), eg iteration

Challenges

Challenge: Using your existing Terraform manifests, create a new resource that will create additional blob containers in your existing storage account.

  • Create a string variable called containernameprefix and assign it a default value of your choice.
  • Using the count meta-argument, create a single blob container resource definition that provisions three containers, naming them prefix-[count#]

Challenge: Using your existing Terraform manifests, create a(nother) blob container, but rather than using the count operator:

  • Create a variable called containersuffixlist of type list and have it contain the values a, b, and c
  • Use the for_each operator in conjunction with a second blob container resource definition to create three more containers with the names prefix-a, prefix-b, and prefix-c.

Success Criteria

  1. Use the Azure portal or Azure cli to verify new containers were added to the storage account.