32/32
Sign inSign up free

1123. Removing One Subnet Would Replace Another

hard 40 XP ~15 minHands-on lab

~/infra/tax-calc creates three subnets with count over the list var.subnets: web, batch and data. The batch subnet is no longer used. Removing "batch" from the list makes tofu plan replace the data subnet, and the database lives there.

Task

  • The batch subnet is deleted.
  • The web and data subnets are the same subnets as before (same IDs).
  • The subnets are managed with for_each, keyed by name: aws_subnet.this["web"] and aws_subnet.this["data"].
  • tofu plan reports no changes.

This machine has an AWS-style account (an emulator: nothing is billed). tofu and the aws CLI are both signed in as the account's administrator.

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.

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.