Skip to content
| Marketplace
Sign in
Visual Studio Code>Azure>Azure TerraformNew to Visual Studio Code? Get it now.
Azure Terraform

Azure Terraform

Preview

Microsoft

microsoft.com
|
976,723 installs
| (4) | Free
VS Code extension for developing with Terraform on Azure
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Azure Terraform

The VSCode Azure Terraform extension is designed to increase developer productivity authoring, testing and using Terraform with Azure. The extension provides terraform command support and resource graph visualization.

overview

Important Note

⚠️ CloudShell integration is currently unavailable in this version of the extension. All Terraform commands will run in your local integrated terminal.

Requirements

This extension requires:

  • Terraform - Required for executing terraform commands
  • GraphViz - Required for the visualize feature

NOTE: Please make sure these requirements are in your PATH environment variable.

Features

This extension supports the following features:

  • Terraform commands: init, plan, apply, validate, refresh and destroy
  • Visualize the terraform module

Commands

Open the Command Palette (Command+Shift+P on macOS and Ctrl+Shift+P on Windows/Linux) and type in one of the following commands:

Command Description
Basic commands:
  • Azure Terraform: init
  • Azure Terraform: plan
  • Azure Terraform: apply
  • Azure Terraform: validate
  • Azure Terraform: refresh
  • Azure Terraform: destroy
Execute terraform command against the current project workspace.

Note: All commands run in your local integrated terminal.
Azure Terraform: visualize Create a visual representation of the components of the module and save it in graph.png.
Azure Terraform: Execute Test Run one of the following test against the current module using a test container:
  • lint: This command will check the formating of the code of the Terraform module.
  • e2e: This command will deploy the current module with the settings specified in the .tfvars file, verify that the deployment pass the controls and destroy the resources that have been created.

Extension Settings

  • azureTerraform.terminal - Specifies terminal used to run Terraform commands. Currently only integrated terminal is supported.
  • azureTerraform.test.imageName - Indicates the container to use to run the tests. By default: microsoft/terraform-test.
  • azureTerraform.test.aciName - Indicates the name of the Azure Container Instance to use for testing. By default: tf-test-aci.
  • azureTerraform.test.aciResourceGroup - Indicates the name of the Resource Group to use for the ACI instance. By default: tfTestResourceGroup.
  • azureTerraform.aciContainerGroup - Indicates the name of the Container Group that host the ACI instance. By default: tfTestContainerGroup
  • azureTerraform.test.location - Indicates the location where to deploy the test container instance. By default: westus.

Release Notes

Refer to CHANGELOG

Telemetry

VS Code collects usage data and sends it to Microsoft to help improve our products and services. Read our privacy statement to learn more. If you would like to opt out of sending telemetry data to Microsoft, update the telemetry.enableTelemetry setting to false in the File -> Preferences -> Settings. Read our FAQ to learn more.

License

MIT

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft