Writing a Terraform configuration file does not require a special code editor. However, popular code editors have adapted and now offer plugins that simplify writing such a file.
In this recipe, we will focus on Visual Studio Code, which has the following benefits:
- It's cross-platform, which means it can be installed on Windows, Linux, and macOS.
- It's free of charge.
- It has a multitude of extensions that cover all the needs of developers on a daily basis.
In this recipe, we will learn how to configure Visual Studio Code so that we can write the Terraform configuration. We'll also see how much faster it is to write code in this way.
Getting ready
For this recipe, you need to have Visual Studio Code installed on your local machine. You can install it by going to https://code.visualstudio.com/.
How to do it…
To use Visual Studio Code with Terraform, we need to install the respective extension and configure it.
To install...