The VSCode TIAT(Tencent Infrastructure Automation for Terraform)Terraform 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 support 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. Provides ways to go to resource documents.
- Code Snippets/Example: provides a completed example code when typing the specified resource type.
- 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 place the cursor on a resource type, use the go to definition
(Command
on macOS) button to jump to this resource document of the terraform provider website.
Or, put cursor under the resource type, press
Command
.
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.
Enjoy!