AWS Terraform Dev Container

A VSCode Dev Container with tools to help you build and manage AWS infrastructure with Terraform

Blockchain & Cloud ComputingShellMIT-0

Abstract

AWS Terraform Dev Container is an open-source Blockchain & Cloud Computing project. A VSCode Dev Container with tools to help you build and manage AWS infrastructure with Terraform. This repository packages a Visual Studio Code dev container for Terraform development. When you open the repository in VS Code and reopen it in the container, you get a Docker image with Terraform, the AWS, Azure, and GCP command line interfaces, and a suite of Terraform linting, security, testing, and cost-estimation tools already installed and pinned to known versions. It is built using Shell, AWS, Terraform. Key capabilities include: Multi-cloud command line tooling: AWS CLI v2, Azure CLI, and Google Cloud SDK; Terraform and supporting tools: terraform, terraform-docs, tflint (with AWS, Azure, and GCP rulesets), tfsec, terrascan, terragrunt, Terratest, infracost, checkov, and pre-commit; VS Code integration: pre-installed extensions, editor settings, and tasks for common Terraform and authentication workflows. The complete source code is publicly available on GitHub under the MIT No Attribution, making it a useful reference for students building a Blockchain & Cloud Computing mini project or final-year project.

1. Introduction

This repository packages a Visual Studio Code dev container for Terraform development. When you open the repository in VS Code and reopen it in the container, you get a Docker image with Terraform, the AWS, Azure, and GCP command line interfaces, and a suite of Terraform linting, security, testing, and cost-estimation tools already installed and pinned to known versions.

The container addresses the setup and consistency problems that come with infrastructure as code work: every contributor runs the same tool versions, credential directories are mounted from the host instead of stored in the image, and pre-commit hooks enforce formatting and security scanning before code is committed. It is intended for infrastructure engineers, platform teams, and anyone learning Terraform who wants a reproducible environment without installing tools on the host.

The image targets Linux containers on the linux/amd64 and linux/arm64 architectures.

2. Objective

A VSCode Dev Container with tools to help you build and manage AWS infrastructure with Terraform

This project demonstrates how Shell, AWS, Terraform can be applied to a real-world Blockchain & Cloud Computing problem.

3. Key Features / Modules

  • Multi-cloud command line tooling: AWS CLI v2, Azure CLI, and Google Cloud SDK.
  • Terraform and supporting tools: terraform, terraform-docs, tflint (with AWS, Azure, and GCP rulesets), tfsec, terrascan, terragrunt, Terratest, infracost, checkov, and pre-commit.
  • VS Code integration: pre-installed extensions, editor settings, and tasks for common Terraform and authentication workflows.
  • Pre-commit hooks for Terraform formatting, validation, documentation, security scanning, and secret detection.
  • Host credential mounts for AWS, Azure, GCP, and SSH, so credentials stay on the host.
  • A persistent Terraform plugin cache to speed up repeated terraform init runs.

4. Technology Stack

ShellAWSTerraform

5. System Requirements

General requirements for this technology stack — check the README for exact versions.

  • Linux / macOS terminal or WSL on Windows
  • Git (to clone the repository)

6. Installation & Setup

git clone https://github.com/awslabs/aws-terraform-dev-container.git
cd aws-terraform-dev-container
  1. Open the project folder in VS Code:
  2. When VS Code prompts you, select Reopen in Container. You can also open the command palette (F1) and run Dev Containers: Reopen in Container.
  3. Wait for the container to build. The first build downloads the base image and installs the tools, which can take several minutes.
  4. When the container starts, the post-start command clears the terminal and prints the installed tool versions, the working directory, and authentication hints.
code aws-terraform-dev-container
.devcontainer/scripts/aws-auth.sh
terraform init
.devcontainer/scripts/aws-auth.sh [--profile PROFILE] [--region REGION] [--sso]
.devcontainer/scripts/azure-auth.sh [--subscription SUBSCRIPTION_ID] [--tenant TENANT_ID] [--service-principal --client-id CLIENT_ID --client-secret CLIENT_SECRET]
.devcontainer/scripts/gcp-auth.sh [--project PROJECT_ID] [--credentials FILE_PATH]
pre-commit install

Full setup instructions are in the project README.

7. Future Enhancements

Suggested extensions you can add to make this your own project.

  • Add a CI/CD pipeline with GitHub Actions
  • Deploy to a public test network or cloud free tier
  • Add monitoring and cost alerts

8. Viva / Review Questions

Common questions examiners ask for projects in this domain.

  1. Why does this problem need a blockchain or cloud-native design?
  2. Explain the smart contract / infrastructure components and how they interact.
  3. How are gas costs or cloud costs kept under control?
  4. How is the system secured (keys, IAM, access control)?
  5. How would the solution scale to many more users?

9. Source Code & License

This project is developed by awslabs and published on GitHub under the MIT No Attribution. Please follow the license terms and credit the original author when you use or modify this code.

Want to build this as your internship project?

Work on a Blockchain & Cloud Computing project like this with mentor guidance, weekly reviews and an internship certificate from Training Trains, Erode — online or offline.

Apply for Blockchain & Cloud Computing Internship