VS Code Autocomplete for Azure Terraform

Azure Terraform extension for vscode will allow autocomplete. But in case we want the resource to be pouplated with required attributes then we need to add below line of code onto settings.json file.

  1. Open Visual Studio Code.
  2. Then open settings.json file using the command Palette.
  3. Press Ctrl+Shift+P
  4. Select/Type Preferences: Open User settings (JSON)
  5. Make the necessary changes by adding below line of code onto settings.json
    “terraform.experimentalFeatures.prefillRequiredFields”: true,
  6. It will look something like below
  1. Save and close the file.
  2. Re-load VSCode and try writing a small terraform code. You will see it will autopopulate the required attribute for that particular resource e.g location & name in case of new resource group as below.
This entry was posted in Azure. Bookmark the permalink.

Leave a Reply

Your email address will not be published.