Photo by Abraham Barrera on Unsplash

Working with Terraform and AWS within a Container on Visual Studio Code

Visual Studio Code | AWS | Terraform | Docker | Containers | Development

βš— Kevin Summersill πŸ”‹
Published in
3 min readSep 22, 2021

--

Are you tired of upgrading your Terraform version on your pc when starting a project? Well, you are in luck. This article will show you how to utilize Terraform within a development container and utilize the AWS CLI. The AWS CLI in this article will be automatically set up to a specific profile using a defined Access ID and Secret Key. The secrets will be provisioned during runtime. This article will also be utilizing Visual Studio Code and the Remote Container extension. The Remote-Containers extensions allow the capability to utilize source code within a container. This can be used when utilizing a central state as well; which is recommended.

Step 1. Install the extension for VS Code called Remote Containers

Show the Remote-Container Extension

Step 2. Setup the .devcontainer folder

Create a β€œ.devcontainer” folder. This will be where all the instructions will be given on how our container is set up.

--

--

βš— Kevin Summersill πŸ”‹
Geek Culture

Enterprise Solution Architect | Certified K8s Administrator/Developer βš“ | SAFe SPC | Cert Terraform | AWS Solutions Architect | Dev*Ops/GitOps Engineer πŸ”₯