The TIAT(Tencent Infrastructure Automation for Terraform)Terraform VS Code extension is designed to improve the efficiency of DevOps when using Terraform with Tencent Cloud. The extension provides TencentCloud Account login, resource explorer, code auto-complete, argument tips, and command palette inside VSCode.
This extension supports the following features:
- Login: log in Tencent Cloud with AKSK.
- Terraform Commands: init, plan, apply, and destroy through the VSCode command Palette.
- Auto Complete: provides code suggestions and auto-complete resource types, arguments, and options.
- Code Snippets/Example: provides a completed example code when typing the specified resource type.
- Tips: provides
Go to Terraform definition
to preview resource documents natively instead of through the official website. - 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 explorer of the specified resource.
- Validate: code check under security and compliance.
Provide Log in entry to Tencent Cloud.
After logged, you can see your account and detail when hovering the status bar.
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:
|
Execute terraform command against the current project workspace. |
Login commands:
|
The shortcut of log in and log out with Tencent Cloud. |
When you typing the resource type, attribute, and options, there is a suggestions dialog.
When you typing the {
after a resource type and name, there is a example suggestions.
Press Enter
to insert the whole example.
NOTE: only support on
tencentcloud_instance
resource. When you logged into Tencent Cloud Account, you may see the resources under this account.
Choose one resource to import it.
After a few minutes, the import resource will be in the generated
folder.
When you open a menu on a terraform resource, click the Go to Terraform Definition
(ctrl+shift+D
on macOS/Linux/Windows) item to open a preview panel to display the resource document locally.
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.
tcTerraform.secretid
andtcTerraform.secretkey
: specify the your tencentcloud secret id and key.tcTerraform.terminal
: Specifies terminal used to run Terraform commands. Valid settings arecloudshell
(TO-DO) orintegrated
.tcTerraform.checkTCCLI
: specifies whether or not TCCLI installed in the PATH.
- Document - TencnetCloud Terraform Registry
- Repo - TencnetCloud Terraform Provider
- Tencent Cloud Terraform extension - Visual Studio Marketplace
Enjoy!