rename the extension name and command id (#130)
* rename the extension name and command id * update according to comments
This commit is contained in:
Родитель
5c2f80370e
Коммит
caf642178e
|
@ -1,6 +1,6 @@
|
||||||
# Change Log
|
# Change Log
|
||||||
|
|
||||||
All notable changes to the "vscode-terraform-azure" extension will be documented in this file.
|
All notable changes to the "Azure Terraform" extension will be documented in this file.
|
||||||
|
|
||||||
Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how to structure this file.
|
Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how to structure this file.
|
||||||
|
|
||||||
|
|
22
README.md
22
README.md
|
@ -1,6 +1,6 @@
|
||||||
# vscode-terraform-azure README
|
# Azure Terraform
|
||||||
|
|
||||||
The VSCode Terraform Azure extension is designed to increase developer productivity building Terraform modules for Azure. The extension provides, linting, terraform command support, resource graph visualization, testing and CloudShell integration inside of VSCode.
|
The VSCode Azure Terraform extension is designed to increase developer productivity building Terraform modules for Azure. The extension provides linting, terraform command support, resource graph visualization, testing and CloudShell integration inside VSCode.
|
||||||
|
|
||||||
![overview](images/overview.png)
|
![overview](images/overview.png)
|
||||||
|
|
||||||
|
@ -14,37 +14,37 @@ This extension supports the following features:
|
||||||
- Visualize the terraform module.
|
- Visualize the terraform module.
|
||||||
- Run linting and end to end tests.
|
- Run linting and end to end tests.
|
||||||
|
|
||||||
### Terraform Azure: init
|
### Azure Terraform: init
|
||||||
|
|
||||||
Executes `terraform init` command against the current project workspace. If run with terminal set to CloudShell, will run `terraform init` in CloudShell.
|
Executes `terraform init` command against the current project workspace. If run with terminal set to CloudShell, will run `terraform init` in CloudShell.
|
||||||
|
|
||||||
### Terraform Azure: plan
|
### Azure Terraform: plan
|
||||||
|
|
||||||
Executes `terraform plan` command against the current project workspace. If run with terminal set to CloudShell, will run `terraform plan` in CloudShell.
|
Executes `terraform plan` command against the current project workspace. If run with terminal set to CloudShell, will run `terraform plan` in CloudShell.
|
||||||
|
|
||||||
### Terraform Azure: apply
|
### Azure Terraform: apply
|
||||||
|
|
||||||
Executes `terraform apply` command against the current project workspace. If run with terminal set to CloudShell, will run `terraform apply` in CloudShell.
|
Executes `terraform apply` command against the current project workspace. If run with terminal set to CloudShell, will run `terraform apply` in CloudShell.
|
||||||
|
|
||||||
### Terraform Azure: validate
|
### Azure Terraform: validate
|
||||||
|
|
||||||
Executes `terraform validate` command against the current project workspace. If run with terminal set to CloudShell, will run `terraform validate` in CloudShell.
|
Executes `terraform validate` command against the current project workspace. If run with terminal set to CloudShell, will run `terraform validate` in CloudShell.
|
||||||
|
|
||||||
### Terraform Azure: refresh
|
### Azure Terraform: refresh
|
||||||
|
|
||||||
Executes `terraform refresh` command against the current project workspace. If run with terminal set to CloudShell, will run `terraform refresh` in CloudShell.
|
Executes `terraform refresh` command against the current project workspace. If run with terminal set to CloudShell, will run `terraform refresh` in CloudShell.
|
||||||
|
|
||||||
### Terraform Azure: destroy
|
### Azure Terraform: destroy
|
||||||
|
|
||||||
Executes `terraform destroy` command against the current project workspace. If run with terminal set to CloudShell, will run `terraform destroy` in CloudShell.
|
Executes `terraform destroy` command against the current project workspace. If run with terminal set to CloudShell, will run `terraform destroy` in CloudShell.
|
||||||
|
|
||||||
### Terraform Azure: visualize
|
### Azure Terraform: visualize
|
||||||
|
|
||||||
> NOTE: only runs locally.
|
> NOTE: only runs locally.
|
||||||
|
|
||||||
Creates a visual representation of the components of the module and save it in `graph.png`. This command requires [GraphViz dot](http://www.graphviz.org) to be installed locally.
|
Creates a visual representation of the components of the module and save it in `graph.png`. This command requires [GraphViz dot](http://www.graphviz.org) to be installed locally.
|
||||||
|
|
||||||
### Terraform Azure: execute test
|
### Azure Terraform: execute test
|
||||||
|
|
||||||
Runs one of the following test against the current module using a test container:
|
Runs one of the following test against the current module using a test container:
|
||||||
|
|
||||||
|
@ -67,7 +67,7 @@ In both cases the default test container is "microsoft/terraform-test" and it ca
|
||||||
|
|
||||||
> NOTE: Running the tests in Azure will count against your Azure consumption.
|
> NOTE: Running the tests in Azure will count against your Azure consumption.
|
||||||
|
|
||||||
### Terraform Azure: push
|
### Azure Terraform: push
|
||||||
|
|
||||||
This command will sync workspace files that meet the filter `tf-azure.files` setting in your configuration to Azure clouddrive.
|
This command will sync workspace files that meet the filter `tf-azure.files` setting in your configuration to Azure clouddrive.
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"name": "vscode-terraform-azure",
|
"name": "vscode-azureerraform",
|
||||||
"version": "0.0.1",
|
"version": "0.0.1",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
|
|
62
package.json
62
package.json
|
@ -1,13 +1,13 @@
|
||||||
{
|
{
|
||||||
"name": "vscode-terraform-azure",
|
"name": "vscode-azureterraform",
|
||||||
"displayName": "vscode-terraform-azure",
|
"displayName": "Azure Terraform",
|
||||||
"description": "VS Code extension for developing with Terraform on Azure",
|
"description": "VS Code extension for developing with Terraform on Azure",
|
||||||
"version": "0.0.1",
|
"version": "0.0.1",
|
||||||
"publisher": "Microsoft",
|
"publisher": "Microsoft",
|
||||||
"icon": "images/terraform.png",
|
"icon": "images/terraform.png",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/Azure/vscode-terraform-azure.git"
|
"url": "https://github.com/Azure/vscode-azureterraform.git"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"vscode": "^1.18.0"
|
"vscode": "^1.18.0"
|
||||||
|
@ -18,20 +18,20 @@
|
||||||
],
|
],
|
||||||
"activationEvents": [
|
"activationEvents": [
|
||||||
"workspaceContains:**/*.tf",
|
"workspaceContains:**/*.tf",
|
||||||
"onCommand:vscode-terraform-azure.init",
|
"onCommand:azureTerraform.init",
|
||||||
"onCommand:vscode-terraform-azure.plan",
|
"onCommand:azureTerraform.plan",
|
||||||
"onCommand:vscode-terraform-azure.apply",
|
"onCommand:azureTerraform.apply",
|
||||||
"onCommand:vscode-terraform-azure.validate",
|
"onCommand:azureTerraform.validate",
|
||||||
"onCommand:vscode-terraform-azure.refresh",
|
"onCommand:azureTerraform.refresh",
|
||||||
"onCommand:vscode-terraform-azure.destroy",
|
"onCommand:azureTerraform.destroy",
|
||||||
"onCommand:vscode-terraform-azure.visualize",
|
"onCommand:azureTerraform.visualize",
|
||||||
"onCommand:vscode-terraform-azure.exectest",
|
"onCommand:azureTerraform.exectest",
|
||||||
"onCommand:vscode-terraform-azure.push"
|
"onCommand:azureTerraform.push"
|
||||||
],
|
],
|
||||||
"main": "./out/extension",
|
"main": "./out/extension",
|
||||||
"contributes": {
|
"contributes": {
|
||||||
"configuration": {
|
"configuration": {
|
||||||
"title": "Terraform Azure",
|
"title": "Azure Terraform",
|
||||||
"properties": {
|
"properties": {
|
||||||
"tf-azure.terminal": {
|
"tf-azure.terminal": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
|
@ -72,49 +72,49 @@
|
||||||
},
|
},
|
||||||
"commands": [
|
"commands": [
|
||||||
{
|
{
|
||||||
"command": "vscode-terraform-azure.plan",
|
"command": "azureTerraform.plan",
|
||||||
"title": "plan",
|
"title": "plan",
|
||||||
"category": "Terraform Azure"
|
"category": "Azure Terraform"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"command": "vscode-terraform-azure.apply",
|
"command": "azureTerraform.apply",
|
||||||
"title": "apply",
|
"title": "apply",
|
||||||
"category": "Terraform Azure"
|
"category": "Azure Terraform"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"command": "vscode-terraform-azure.init",
|
"command": "azureTerraform.init",
|
||||||
"title": "init",
|
"title": "init",
|
||||||
"category": "Terraform Azure"
|
"category": "Azure Terraform"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"command": "vscode-terraform-azure.validate",
|
"command": "azureTerraform.validate",
|
||||||
"title": "validate",
|
"title": "validate",
|
||||||
"category": "Terraform Azure"
|
"category": "Azure Terraform"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"command": "vscode-terraform-azure.refresh",
|
"command": "azureTerraform.refresh",
|
||||||
"title": "refresh",
|
"title": "refresh",
|
||||||
"category": "Terraform Azure"
|
"category": "Azure Terraform"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"command": "vscode-terraform-azure.destroy",
|
"command": "azureTerraform.destroy",
|
||||||
"title": "destroy",
|
"title": "destroy",
|
||||||
"category": "Terraform Azure"
|
"category": "Azure Terraform"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"command": "vscode-terraform-azure.visualize",
|
"command": "azureTerraform.visualize",
|
||||||
"title": "visualize",
|
"title": "visualize",
|
||||||
"category": "Terraform Azure"
|
"category": "Azure Terraform"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"command": "vscode-terraform-azure.exectest",
|
"command": "azureTerraform.exectest",
|
||||||
"title": "execute test",
|
"title": "execute test",
|
||||||
"category": "Terraform Azure"
|
"category": "Azure Terraform"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"command": "vscode-terraform-azure.push",
|
"command": "azureTerraform.push",
|
||||||
"title": "push",
|
"title": "push",
|
||||||
"category": "Terraform Azure"
|
"category": "Azure Terraform"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
|
@ -162,7 +162,7 @@ export class CloudShell extends BaseShell {
|
||||||
DialogOption.CANCEL,
|
DialogOption.CANCEL,
|
||||||
);
|
);
|
||||||
if (choice === DialogOption.OK) {
|
if (choice === DialogOption.OK) {
|
||||||
await vscode.commands.executeCommand("vscode-terraform-azure.push");
|
await vscode.commands.executeCommand("azureTerraform.push");
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,11 +1,7 @@
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
export class Constants {
|
export class Constants {
|
||||||
public static ExtensionId = "vscode-terraform-azure";
|
|
||||||
public static LineSeperator = Array(50).join("=");
|
|
||||||
public static AzureAccountExtensionId = "ms-vscode.azure-account";
|
|
||||||
public static TerraformTerminalName = "Terraform";
|
public static TerraformTerminalName = "Terraform";
|
||||||
public static UserAgentName = "VSCODEEXT_USER_AGENT";
|
|
||||||
public static TestContainer = "microsoft/terraform-test";
|
public static TestContainer = "microsoft/terraform-test";
|
||||||
public static clouddrive = "$HOME/clouddrive";
|
public static clouddrive = "$HOME/clouddrive";
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,31 +22,31 @@ export function activate(ctx: vscode.ExtensionContext) {
|
||||||
cloudShell = new CloudShell();
|
cloudShell = new CloudShell();
|
||||||
integratedShell = new IntegratedShell();
|
integratedShell = new IntegratedShell();
|
||||||
|
|
||||||
ctx.subscriptions.push(vscode.commands.registerCommand("vscode-terraform-azure.init", () => {
|
ctx.subscriptions.push(vscode.commands.registerCommand("azureTerraform.init", () => {
|
||||||
getShell().runTerraformCmd("terraform init");
|
getShell().runTerraformCmd("terraform init");
|
||||||
}));
|
}));
|
||||||
|
|
||||||
ctx.subscriptions.push(vscode.commands.registerCommand("vscode-terraform-azure.plan", () => {
|
ctx.subscriptions.push(vscode.commands.registerCommand("azureTerraform.plan", () => {
|
||||||
getShell().runTerraformCmd("terraform plan");
|
getShell().runTerraformCmd("terraform plan");
|
||||||
}));
|
}));
|
||||||
|
|
||||||
ctx.subscriptions.push(vscode.commands.registerCommand("vscode-terraform-azure.apply", () => {
|
ctx.subscriptions.push(vscode.commands.registerCommand("azureTerraform.apply", () => {
|
||||||
getShell().runTerraformCmd("terraform apply");
|
getShell().runTerraformCmd("terraform apply");
|
||||||
}));
|
}));
|
||||||
|
|
||||||
ctx.subscriptions.push(vscode.commands.registerCommand("vscode-terraform-azure.destroy", () => {
|
ctx.subscriptions.push(vscode.commands.registerCommand("azureTerraform.destroy", () => {
|
||||||
getShell().runTerraformCmd("terraform destroy");
|
getShell().runTerraformCmd("terraform destroy");
|
||||||
}));
|
}));
|
||||||
|
|
||||||
ctx.subscriptions.push(vscode.commands.registerCommand("vscode-terraform-azure.refresh", () => {
|
ctx.subscriptions.push(vscode.commands.registerCommand("azureTerraform.refresh", () => {
|
||||||
getShell().runTerraformCmd("terraform refresh");
|
getShell().runTerraformCmd("terraform refresh");
|
||||||
}));
|
}));
|
||||||
|
|
||||||
ctx.subscriptions.push(vscode.commands.registerCommand("vscode-terraform-azure.validate", () => {
|
ctx.subscriptions.push(vscode.commands.registerCommand("azureTerraform.validate", () => {
|
||||||
getShell().runTerraformCmd("terraform validate");
|
getShell().runTerraformCmd("terraform validate");
|
||||||
}));
|
}));
|
||||||
|
|
||||||
ctx.subscriptions.push(vscode.commands.registerCommand("vscode-terraform-azure.visualize", async () => {
|
ctx.subscriptions.push(vscode.commands.registerCommand("azureTerraform.visualize", async () => {
|
||||||
if (terminalSetToCloudshell()) {
|
if (terminalSetToCloudshell()) {
|
||||||
const choice: vscode.MessageItem = await vscode.window.showInformationMessage(
|
const choice: vscode.MessageItem = await vscode.window.showInformationMessage(
|
||||||
"Visualization only works locally. Would you like to run it in the integrated terminal?",
|
"Visualization only works locally. Would you like to run it in the integrated terminal?",
|
||||||
|
@ -60,7 +60,7 @@ export function activate(ctx: vscode.ExtensionContext) {
|
||||||
await integratedShell.visualize();
|
await integratedShell.visualize();
|
||||||
}));
|
}));
|
||||||
|
|
||||||
ctx.subscriptions.push(vscode.commands.registerCommand("vscode-terraform-azure.exectest", async () => {
|
ctx.subscriptions.push(vscode.commands.registerCommand("azureTerraform.exectest", async () => {
|
||||||
console.log("Testing current module");
|
console.log("Testing current module");
|
||||||
const pick: string = await vscode.window.showQuickPick(
|
const pick: string = await vscode.window.showQuickPick(
|
||||||
[TestOption.lint, TestOption.e2e, TestOption.custom],
|
[TestOption.lint, TestOption.e2e, TestOption.custom],
|
||||||
|
@ -77,8 +77,7 @@ export function activate(ctx: vscode.ExtensionContext) {
|
||||||
|
|
||||||
}));
|
}));
|
||||||
|
|
||||||
ctx.subscriptions.push(vscode.commands.registerCommand("vscode-terraform-azure.push", async () => {
|
ctx.subscriptions.push(vscode.commands.registerCommand("azureTerraform.push", async () => {
|
||||||
// Create a function that will sync the files to Cloudshell
|
|
||||||
if (terminalSetToCloudshell()) {
|
if (terminalSetToCloudshell()) {
|
||||||
const tfFiles: vscode.Uri[] = await vscode.workspace.findFiles(filesGlobSetting());
|
const tfFiles: vscode.Uri[] = await vscode.workspace.findFiles(filesGlobSetting());
|
||||||
await cloudShell.pushFiles(tfFiles);
|
await cloudShell.pushFiles(tfFiles);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
THIRD-PARTY SOFTWARE NOTICES AND INFORMATION
|
THIRD-PARTY SOFTWARE NOTICES AND INFORMATION
|
||||||
For vscode-terraform-azure extension
|
For vscode-azureterraform extension
|
||||||
|
|
||||||
This extension uses Open Source components. You can find the source code of their
|
This extension uses Open Source components. You can find the source code of their
|
||||||
open source projects along with the license information below. We acknowledge and
|
open source projects along with the license information below. We acknowledge and
|
||||||
|
|
Загрузка…
Ссылка в новой задаче