Skip to content

Commit 4735405

Browse files
committed
basic version
0 parents  commit 4735405

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+23866
-0
lines changed

.DS_Store

6 KB
Binary file not shown.

.editorconfig

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# EditorConfig is awesome: https://EditorConfig.org
2+
3+
# top-most EditorConfig file
4+
root = true
5+
6+
[*]
7+
indent_style = space
8+
indent_size = 4
9+
end_of_line = lf
10+
charset = utf-8
11+
trim_trailing_whitespace = false
12+
insert_final_newline = false

.eslintrc.json

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"root": true,
3+
"parser": "@typescript-eslint/parser",
4+
"parserOptions": {
5+
"ecmaVersion": 6,
6+
"sourceType": "module"
7+
},
8+
"plugins": [
9+
"@typescript-eslint"
10+
],
11+
"rules": {
12+
"@typescript-eslint/naming-convention": "warn",
13+
"@typescript-eslint/semi": "warn",
14+
"curly": "warn",
15+
"eqeqeq": "warn",
16+
"no-throw-literal": "warn",
17+
"semi": "off"
18+
},
19+
"ignorePatterns": [
20+
"out",
21+
"dist",
22+
"**/*.d.ts"
23+
]
24+
}

.gitignore

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
out
2+
dist
3+
node_modules
4+
.vscode-test/
5+
*.vsix

.vscode/extensions.json

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
// See http://go.microsoft.com/fwlink/?LinkId=827846
3+
// for the documentation about the extensions.json format
4+
"recommendations": [
5+
"dbaeumer.vscode-eslint"
6+
]
7+
}

.vscode/launch.json

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
// A launch configuration that compiles the extension and then opens it inside a new window
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
{
6+
"version": "0.2.0",
7+
"configurations": [
8+
{
9+
"name": "Run Extension",
10+
"type": "extensionHost",
11+
"request": "launch",
12+
"args": [
13+
"--extensionDevelopmentPath=${workspaceFolder}"
14+
],
15+
"outFiles": [
16+
"${workspaceFolder}/out/**/*.js"
17+
],
18+
"preLaunchTask": "${defaultBuildTask}",
19+
"env": {
20+
"DEBUG": "true" // <---- EXAMPLE ENVIRONMENT VARIABLE
21+
}
22+
},
23+
{
24+
"name": "Extension Tests",
25+
"type": "extensionHost",
26+
"request": "launch",
27+
"args": [
28+
"--extensionDevelopmentPath=${workspaceFolder}",
29+
"--extensionTestsPath=${workspaceFolder}/out/test/suite/index"
30+
],
31+
"outFiles": [
32+
"${workspaceFolder}/out/test/**/*.js"
33+
],
34+
"preLaunchTask": "${defaultBuildTask}"
35+
}
36+
]
37+
}

.vscode/settings.json

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// Place your settings in this file to overwrite default and user settings.
2+
{
3+
"files.exclude": {
4+
"out": false // set this to true to hide the "out" folder with the compiled JS files
5+
},
6+
"search.exclude": {
7+
"out": true // set this to false to include "out" folder in search results
8+
},
9+
// Turn off tsc task auto detection since we have the necessary tasks as npm scripts
10+
"typescript.tsc.autoDetect": "off"
11+
}

.vscode/tasks.json

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// See https://go.microsoft.com/fwlink/?LinkId=733558
2+
// for the documentation about the tasks.json format
3+
{
4+
"version": "2.0.0",
5+
"tasks": [
6+
{
7+
"type": "npm",
8+
"script": "watch",
9+
"problemMatcher": "$tsc-watch",
10+
"isBackground": true,
11+
"presentation": {
12+
"reveal": "never"
13+
},
14+
"group": {
15+
"kind": "build",
16+
"isDefault": true
17+
}
18+
}
19+
]
20+
}

.vscodeignore

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
.vscode/**
2+
.vscode-test/**
3+
src/**
4+
.gitignore
5+
.yarnrc
6+
vsc-extension-quickstart.md
7+
**/tsconfig.json
8+
**/.eslintrc.json
9+
**/*.map
10+
**/*.ts

CHANGELOG.md

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Change Log
2+
3+
All notable changes to the "vscode-tencentcloud-terraform" extension will be documented in this file.
4+
5+
Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how to structure this file.
6+
7+
## [Unreleased]
8+
9+
- Initial release

LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) Tencent Corporation. All rights reserved.
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE

README.md

+93
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
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!**

config/snippets/provider.json

Whitespace-only changes.

config/snippets/resources.json

Whitespace-only changes.

0 commit comments

Comments
 (0)