World map

 

BM: Baca dalam Bahasa Melayu

World T1: Blueprints Β· Boss challenge

Build a tiny food court

You will learn: to run the whole loop on your own: init, plan, apply, change, destroy.

Checked with OpenTofu 1.13 on 1 Nov 2026

The problem

Boss: Kedai Kancil runs a tiny food court at Saturday’s fair. You get the blueprint fresh from Git. What do you type first?

Pick one answer.

Try it

Build the food court: a stall name, a table, a board, a bell, a lamp. Use init, plan, then apply.

Blueprint (your .tf files)needs tofu init

  • local_file.boardnot built yet
  • null_resource.lampnot built yet
  • random_integer.tablenot built yet
  • random_pet.stallnot built yet
  • terraform_data.bellnot built yet

Built (the state file)

Nothing built yet.

Blueprint: 5 resources. Built: 0.

Change a file, then run tofu plan to see what it means.

Try it

Friday night, the boss changes the blueprint. Read the plan before anyone builds.

Read the plan. What will OpenTofu do to each resource?

+ create~ update in place- destroy-/+ replace

0 of 4 read

  1.   # local_file.menu
      + resource "local_file" "menu" {
          + content              = <<-EOT
                Nasi lemak
                Teh tarik
            EOT
          + content_base64sha256 = (known after apply)
          + content_base64sha512 = (known after apply)
          + content_md5          = (known after apply)
          + content_sha1         = (known after apply)
          + content_sha256       = (known after apply)
          + content_sha512       = (known after apply)
          + directory_permission = "0777"
          + file_permission      = "0777"
          + filename             = "menu.txt"
          + id                   = (known after apply)
        }
    

    What happens to local_file.menu?

  2.   # null_resource.lamp
      - resource "null_resource" "lamp" {
          - id       = "1372104572265717479" -> null
          - triggers = {
              - "table" = "540"
            } -> null
        }
    

    What happens to null_resource.lamp?

  3.   # random_pet.stall
    -/+ resource "random_pet" "stall" {
          ~ id        = "gecko" -> (known after apply)
          ~ length    = 1 -> 2 # forces replacement
            # (1 unchanged attribute hidden)
        }
    

    What happens to random_pet.stall?

  4.   # terraform_data.bell
      ~ resource "terraform_data" "bell" {
            id     = "c1275269-3f26-b993-2043-0c9fdd3dfdb7"
          ~ input  = "ring" -> "ding dong"
          ~ output = "ring" -> (known after apply)
        }
    

    What happens to terraform_data.bell?

The summary line shows when you finish.

Predict

The plan shows - next to null_resource.lamp. Why does the lamp go?

Pick one answer.

Try it

The plan looks right. Apply the new blueprint.

Blueprint (your .tf files)init done

  • local_file.board
  • local_file.menunot built yet
  • random_integer.table
  • random_pet.stall
  • terraform_data.bell

Built (the state file)state #1

  • local_file.board
  • null_resource.lamp
  • random_integer.table
  • random_pet.stall
  • terraform_data.bell
Blueprint: 5 resources. Built: 5.

Change a file, then run tofu plan to see what it means.

Check

Your fair checklist. Put it in order.

First step at the top. Put these in order. Use the arrows, or drag.

  • tofu plan and read every symbol
  • tofu destroy when the fair is over
  • Change the blueprint, plan again, apply again
  • tofu init in the fresh folder
  • tofu apply, then yes

Try it

Sunday night. The fair is over. Tear the food court down.

Blueprint (your .tf files)init done

  • local_file.board
  • local_file.menu
  • random_integer.table
  • random_pet.stall
  • terraform_data.bell

Built (the state file)state #1

  • local_file.board
  • local_file.menu
  • random_integer.table
  • random_pet.stall
  • terraform_data.bell
Blueprint: 5 resources. Built: 5.

Change a file, then run tofu plan to see what it means.

You did it!

You can now build, change and tear down a blueprint on your own.

Go deeper (optional)

Real rep (optional): build this food court on your own machine. It uses only the random, local and null providers, so it costs nothing.

Real mission

  1. mkdir fair && cd fair
  2. tofu init
  3. tofu plan
  4. tofu apply
  5. cat board.txt
  6. tofu destroy

0 of 7 steps done Β· Your ticks are saved.