The Terraform AzApi Provider Visual Studio Code (VS Code) extension adds editing features like completion/hover/diagnositics for terraform-provider-azapi Terraform files using the Terraform AzApi Provider Language Server.
- Manages the Terraform AzApi Provider Language Server, exposing its features:
- Completion of
azapiresources and data sources - Completion of allowed azure resource types when input
typeinazapiresources - Completion of allowed azure resource properties when input
bodyinazapiresources, limitation: it only works when usejsonencodefunction to build the JSON - Show hint when hover on
azapiresources - Diagnostics to indicate schema errors as you type
- Convert resource JSON to azapi configuration.
- Convert ARM template to azapi configuration.
Completion of allowed azure resource types when input type in azapi resources
Completion of allowed azure resource properties when input body in azapi resources
Completion of required properties for any discriminated objects.
Show hint when hover on azapi resources and diagnostics to indicate schema errors as you type.
Paste resource JSON to the terraform configuration, it will convert to azapi configuration.
Paste ARM template to the terraform configuration, it will convert to azapi configuration.
This extension offers several configuration options. To modify these, navigate to the extension view within VS Code, select the settings cog and choose Extension settings, or alternatively, modify the .vscode/settings.json file in the root of your working directory.
We use telemetry to send error reports to our team, so we can respond more effectively. If you want to disable this setting, add "telemetry.enableTelemetry": false to your settings.json and that will turn off all telemetry in VSCode. You can also monitor what's being sent in your logs.
See the CHANGELOG for more information.
- Prerequisites: golang >1.16, node 16.X, npm 8.X
- Clone Terraform AzApi Provider Language Server to local
- Run
go installunder project folder - Add the following configuration to vscode setting file.
"azapi.languageServer": {
"external": true,
"pathToBinary": "C:\\Users\\henglu\\go\\bin\\azapi-lsp.exe", //file path to language server
"args": [
"serve"
],
"trace.server": "messages"
},
- Clone this project to local
- Run
npm installto download dependencies - Run
code .to open this project in VSCode - Press
F5, it will open a new VSCode Window, you can test its features in it.
We wish to thank HashiCorp for the use of some MPLv2-licensed code from their open source project vscode-terraform.





