|
| 1 | +# TencentCloud Terraform |
| 2 | + |
| 3 | +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. |
| 4 | + |
| 5 | +## Features |
| 6 | + |
| 7 | +This extension supports the following features: |
| 8 | + |
| 9 | +- Terraform commands: init, plan, apply, validate, refresh and destroy. |
| 10 | +- Auto complete: Autocomplete resource types, parameters, and resource definitions. |
| 11 | + |
| 12 | +*TO-DO(Features to be supported in the future):* |
| 13 | +- Visualize: graph the terraform resources and modules. |
| 14 | +- Resource Import: takeover and manage the existing resources on Tencent Cloud. |
| 15 | +- Auto complete: provider code snippets of specified. |
| 16 | +- Cloud shell: connect to Tencnet Cloud. |
| 17 | + |
| 18 | +## Commands |
| 19 | + |
| 20 | +Open the Command Palette (`Command`+`Shift`+`P` on macOS and `Ctrl`+`Shift`+`P` on Windows/Linux) and type in one of the following commands: |
| 21 | + |
| 22 | +<table> |
| 23 | + <thead> |
| 24 | + <tr> |
| 25 | + <th>Command</th> |
| 26 | + <th>Description</th> |
| 27 | + </tr> |
| 28 | + </thead> |
| 29 | + <tbody> |
| 30 | + <tr> |
| 31 | + <td width="35%"> |
| 32 | + Basic commands:<br> |
| 33 | + <ul> |
| 34 | + <li>TencentCloud Terraform: init</li> |
| 35 | + <li>TencentCloud Terraform: plan</li> |
| 36 | + <li>TencentCloud Terraform: apply</li> |
| 37 | + <li>TencentCloud Terraform: validate</li> |
| 38 | + <li>TencentCloud Terraform: refresh</li> |
| 39 | + <li>TencentCloud Terraform: destroy</li> |
| 40 | + </ul> |
| 41 | + </td> |
| 42 | + <td> |
| 43 | + Execute terraform command against the current project workspace. |
| 44 | + If run with terminal set to Cloud Shell, will run the command in Cloud Shell. |
| 45 | + </td> |
| 46 | + </tr> |
| 47 | + <tr> |
| 48 | + <td>TencentCloud Terraform: visualize(TO-DO)</td> |
| 49 | + <td>Create a visual representation of the components of the module and save it in <code>graph.png</code>.</td> |
| 50 | + </tr> |
| 51 | + <tr> |
| 52 | + <td>TencentCloud Terraform: push(TO-DO)</td> |
| 53 | + <td>Push workspace files that meet the filter <code>azureTerraform.files</code> setting in your configuration to Cloud Shell.</td> |
| 54 | + </tr> |
| 55 | + <tr> |
| 56 | + <td>TencentCloud Terraform: Execute Test(TO-DO)</td> |
| 57 | + <td> |
| 58 | + Run one of the following test against the current module using a test container: <br> |
| 59 | + <ul> |
| 60 | + <li>lint: This command will check the formating of the code of the Terraform module.</li> |
| 61 | + <li>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.</li> |
| 62 | + </ul> |
| 63 | + </td> |
| 64 | + </tr> |
| 65 | + </tbody> |
| 66 | +</table> |
| 67 | + |
| 68 | + |
| 69 | +## Requirements |
| 70 | + |
| 71 | +This extension requires: |
| 72 | + |
| 73 | +- [Terraform](https://www.terraform.io/downloads.html) - If you are executing terraform commands in integrated teminal. |
| 74 | +- [Node.js 6.0+](https://nodejs.org) - If you are using Cloud Shell. |
| 75 | +- [GraphViz](http://www.graphviz.org) - If you are using the visualize feature. |
| 76 | + |
| 77 | +> NOTE: Please make sure these requirements are in your PATH environment variable. |
| 78 | +
|
| 79 | +## Extension Settings |
| 80 | + |
| 81 | +- `tcTerraform.secretid` and `tcTerraform.secretkey`: specify the your tencentcloud secret id and key. |
| 82 | +- `tcTerraform.terminal`: Specifies terminal used to run Terraform commands. Valid settings are `cloudshell`(TO-DO) or `integrated`. |
| 83 | +- `tcTerraform.checkTCCLI`: specifies whether or not TCCLI installed in the PATH. |
| 84 | + |
| 85 | + |
| 86 | +## License |
| 87 | +[MIT](LICENSE.md) |
| 88 | + |
| 89 | +## Reference |
| 90 | +- [Source code of the tencentcloud terraform provider ](https://github.com/tencentcloudstack/terraform-provider-tencentcloud) |
| 91 | +- [Document of the tencentcloud terraform](https://registry.terraform.io/providers/tencentcloudstack/tencentcloud/latest) |
| 92 | + |
| 93 | +**Enjoy!** |
0 commit comments