Skip to main content

Tutorial series

Build an AWS environment with OpenTofu

Build a small AWS environment end to end in OpenTofu: project layout, a VPC, a web server with cloud-init, encrypted remote state, a tested module, plans in pull requests and drift checks.

  1. Launch the Relay web server with OpenTofu, an instance profile and cloud-init

    You will launch Relay's Ubuntu 26.04 web server in its public subnet with OpenTofu, built from a looked-up image, a validated cloud-init template, an IAM role that can only read the assets bucket, IMDSv2 and an encrypted disk, and end with its public URL as an output.

    Intermediate · 20 min