Skip to content
Ameen Abozaid
Planned lessonMID-058-L06

Demo: rebuilding the clicked infrastructure as code

  • Lesson 6 of 6
  • Mid-level
On This Lesson 3 topics

This lesson is planned. The outline below lists the topics it will cover. The full lesson has not been published yet.

In this lesson

recreate the MID-056 environment from code. Prepares MID-058-LAB1.

Draft outline details

Step by step

  1. Create the remote state backend with locking.
  2. Write network, database, and storage modules from the MID-056 design; call them from envs/dev.
  3. Planned mistake: run apply without reading the plan and it tries to replace the database. Fix: read the plan, spot the -/+ replacement, and adjust the change (or use a lifecycle rule) before applying.
  4. Apply, then change a security group in the console and show the drift in the next plan.
  5. Destroy and recreate everything from code alone; compare the result with the MID-056 environment.

Check your understanding

What in a plan warns of data loss?

Show answer

A resource marked for replacement or destroy, such as -/+.

Practice

Apply this lesson with the module's lab, exercises and quiz.

Lab and exercises Quiz

Marking a lesson complete is optional and you can undo it any time. Your progress stays in this browser.

Type to search levels, phases, modules and lessons.