Welcome to the intermediate level of the Building CloudHaven challenge adventure! Your mission: modernize CloudHaven’s infrastructure from manual provisioning to a self-service platform. This is a hands-on journey through OpenTofu.
The entire infrastructure is pre-provisioned in your Codespace — OpenTofu and mock cloud services are ready to go when you need them. You don’t need to set up anything locally. Just focus on solving the problem.
The Challenge
After fixing the Foundation Stones, CloudHaven is thriving! The city has grown to three districts, and the Guild decided to refactor the infrastructure into reusable modules. A senior engineer started the work using Test-Driven Development - writing tests first, then implementing. But they were called away before finishing, leaving behind working tests… and buggy code that doesn’t match them. Your mission: fix the bugs, complete the integration test, and deploy the infrastructure.
What You’ll Learn
-
OpenTofu module structure & testing with
tofu test -
Test-Driven Development (TDD) workflow
-
Input validation
-
How to use the
movedblock for refactoring infrastructure
Objective
By the end of this level, you should have:
-
All tests of the districts module pass
-
A completed integration test that applies infrastructure against the mock GCP API to verify end-to-end functionality
-
Three districts deployed with correctly configured infrastructure (vaults and ledgers)
Important: The tests are correct - they define the expected behavior. Your job is to fix the implementation to match what the tests expect. Don’t modify existing tests unless a comment tells you to; let the tests guide your fixes.
Deadline
Sunday, 1 February 2026 at 23:59 CET
You can still complete the challenge after this date, but points will only be awarded for submissions before the deadline.
Level:
Intermediate
Get Started
Discussion
Share your solutions and questions in this thread.
Good luck, and we can’t wait to see your solutions!





