/vscode-tencentcloud-terraform

VS Code extension for developing with Terraform on Tencent Cloud

Primary LanguageTypeScriptMIT LicenseMIT

TencentCloud Terraform

The VSCode TIAT(Tencent Infrastructure Automation for Terraform)Terraform extension is designed to increase developer productivity authoring, testing and using Terraform with Tencent Cloud. The extension provides terraform command support, resource graph visualization and CloudShell integration inside VSCode.

Features

This extension supports the following features:

  • Terraform commands: init, plan, apply, validate, refresh and destroy.
  • Auto complete: Autocomplete resource types, parameters, and resource definitions.
  • Import resource: display the existing CVM resource and then import it as a tf file by Terraformer.

TO-DO(Features to be supported in the future):

  • Visualize: graph the terraform resources and modules.
  • Autocomplete: provider code snippets of the specified resource.
  • Connect to Tencent Cloud: login to Tencent Cloud and sync your account info(eg: obtain AKSK/Token automatically).

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:
  • TencentCloud Terraform: init
  • TencentCloud Terraform: plan
  • TencentCloud Terraform: apply
  • TencentCloud Terraform: validate
  • TencentCloud Terraform: refresh
  • TencentCloud Terraform: destroy
Execute terraform command against the current project workspace. If run with terminal set to Cloud Shell, will run the command in Cloud Shell.
TencentCloud Terraform: visualize(TO-DO) Create a visual representation of the components of the module and save it in graph.png.
TencentCloud Terraform: push(TO-DO) Push workspace files that meet the filter azureTerraform.files setting in your configuration to Cloud Shell.
TencentCloud Terraform: Execute Test(TO-DO) 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.

Requirements

This extension requires:

  • Terraform - If you are executing terraform commands in integrated teminal.
  • Node.js 6.0+ - If you are using Cloud Shell.
  • GraphViz - If you are using the visualize feature.

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

Extension Settings

  • tcTerraform.secretid and tcTerraform.secretkey: specify the your tencentcloud secret id and key.
  • tcTerraform.terminal: Specifies terminal used to run Terraform commands. Valid settings are cloudshell(TO-DO) or integrated.
  • tcTerraform.checkTCCLI: specifies whether or not TCCLI installed in the PATH.

License

MIT

Reference

Enjoy!