Sign inSign up free

865. Reload Only When the Config Changes

medium 20 XP ~8 minHands-on lab

This machine has OpenTofu, the open-source tool that reads the same configuration language as Terraform. Run it as tofu (terraform runs the same program). There is no network: the local, random and null providers are already installed.

/home/student/infra/notifier writes /home/student/out/app.conf from var.settings, and terraform_data.reload tells the app to reload (it appends reload to /home/student/out/reload.log). The reload ran once, at creation. Since then, config changes are applied but the app keeps running with the old settings.

Task

Make terraform_data.reload run again every time the config file changes, and not when nothing changed. Keep its provisioner as it is.

The grader applies a new settings value twice and counts the reloads.

About this machine

Ubuntu 24.04 with no internet access. You are student with passwordless sudo. The grader checks the final state of the machine, not the commands you typed. Values like names and ports are generated for you.

Part of Prepare for the Terraform Associate

Teaching or writing about this? Embed this lab on your page

TerminalNot started

Your machine is ready to start

A fresh, isolated Ubuntu machine boots in a few seconds with the task already set up.

No account needed: 3 of 3 free tries left. Guest machines last 30 minutes.