Exercises

Terraform Infrastructure as Code Fundamentals

Test your practical understanding of Terraform as an infrastructure as code tool. This quiz covers initialization, execution plans, state management, resource dependencies, modules, importing resources, lifecycle controls, iteration, and drift detection. The questions combine foundational concepts with realistic scenarios that developers and IT professionals encounter when provisioning and maintaining infrastructure.

Answer the questions below and check the explanation for each answer.

0/10 answered

  1. 1

    Which Terraform command initializes a working directory and downloads the required providers and modules?

    Question 1
  2. 2

    What is the primary purpose of running terraform plan?

  3. 3

    Why is a remote Terraform state backend generally preferred when a team collaborates on the same infrastructure?

    Question 3
  4. 4

    A subnet resource references the ID of a virtual network resource in its configuration. How does Terraform usually interpret this reference?

    Question 4
  5. 5

    Which statement correctly distinguishes Terraform input variables from output values?

  6. 6

    What is the main benefit of organizing Terraform configuration into modules?

  7. 7

    What does importing an existing cloud resource into Terraform primarily accomplish?

    Question 7
  8. 8

    What happens when a planned operation would destroy a resource configured with lifecycle prevent_destroy set to true?

  9. 9

    Why can for_each be safer than count when managing a collection whose items may be removed or reordered?

  10. 10

    An administrator manually changes a Terraform-managed resource in the cloud console. What will a later Terraform plan generally do?

Download the App now to have access to + 5000 free courses, exercises, certificates and lots of content without paying anything!

  • 100% free online courses from start to finish

    Thousands of online courses in video, ebooks and audiobooks.

  • More than 60 thousand free exercises

    To test your knowledge during online courses

  • Valid free Digital Certificate with QR Code

    Generated directly from your cell phone's photo gallery and sent to your email

Cursa app on the ebook screen, the video course screen and the course exercises screen, plus the course completion certificate