Terraform EC2 demo
Project · challenge · 2025
Terraform EC2 demo solves an infrastructure-as-code challenge from roadmap.sh, using AWS EC2 in place of DigitalOcean. A Terraform configuration creates one Ubuntu EC2 instance with a public IP address in the account's default network, and allows SSH access with the user's own existing key.
Details
- The configuration is split into providers, variables, outputs and a reusable module, as Terraform projects usually are.
- Credentials come from an AWS profile or environment variables, never from files in the repository. An example variables file shows what to fill in.
- The provider lock file is committed, so every run uses the same provider versions.
The next challenges followed on from this one: deploying a Node.js service with Terraform and Ansible, then a containerised service.
See also
In the knowledge graph
Terraform EC2 demo and the 10 things it is linked to. Open any dot for its page, or explore it in the full graph.
As data
Everything on this page is read from triples in the knowledge graph. These are the 21 it states about Terraform EC2 demo, and 3 more its ontology implies; the console runs SPARQL over the whole graph, here in your browser.
@prefix id: <https://ask.chaipat.cc/id/> . @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . @prefix cj: <https://ask.chaipat.cc/ns#> . @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . @prefix xsd: <http://www.w3.org/2001/XMLSchema#> . id:DemoTerraform a cj:Project ; rdfs:label "Terraform EC2 demo" ; cj:description "Terraform for a single Ubuntu EC2 instance with SSH access (roadmap.sh challenge)." ; cj:context id:OpenSource ; cj:repository "https://github.com/AppleBoiy/demo-terraform"^^xsd:anyURI ; cj:firstCommit "2025-10-02"^^xsd:date ; cj:lastCommit "2025-10-02"^^xsd:date ; cj:commitCount 2 ; cj:kind "challenge" ; cj:theme id:ThemeDevOps ; cj:uses id:Terraform , id:AWS ; cj:tier 3 ; cj:integrates id:RoadmapSh ; cj:runsOn id:Linux ; cj:partOf id:RoadmapShSeries ; cj:succeededBy id:IaCNodejs ; cj:mentions id:Dockerized ; cj:article "https://ask.chaipat.cc/wiki/DemoTerraform"^^xsd:anyURI ; cj:activeIn id:Y2025 ; cj:activity _:b32 .