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.
- Open Visual Studio Code.
- Then open settings.json file using the command Palette.
- Press Ctrl+Shift+P
- Select/Type Preferences: Open User settings (JSON)
- Make the necessary changes by adding below line of code onto settings.json
“terraform.experimentalFeatures.prefillRequiredFields”: true, - It will look something like below
- Save and close the file.
- 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.