From 9a88dd7a8c1870af6c0ccb6c21afd34a4d78e0ea Mon Sep 17 00:00:00 2001 From: Jose Luis Pedrosa Date: Fri, 19 Jun 2020 17:35:09 +0100 Subject: [PATCH] Add the configuration to use the integrated UI in vscode --- provider/CONTRIBUTE.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/provider/CONTRIBUTE.md b/provider/CONTRIBUTE.md index 7c9b95fe..508825b8 100644 --- a/provider/CONTRIBUTE.md +++ b/provider/CONTRIBUTE.md @@ -128,6 +128,20 @@ ARM_TEST_LOCATION_ALT= TF_ACC=1 ``` +If you would preffer to use the UI to launch the tests, it is aso possible to specify the environment variables used by vscode integrated testing by modifying the settings.json. Two options are available + * Use the built in variables definition: + ```json + "go.testEnvVars": { + "ARM_CLIENT_ID" : "" + ... + ... + }, + ``` + * Use the contents of a file as `private.env` +```json + "go.testEnvFile": "${workspaceRoot}/.vscode/private.env" +``` + *Note: it is possible to customize the logging level of Terraform. It might be super useful in some situations. It can be done by setting the `TF_LOG` environment variable. Refer to [the official debugging documentation](https://www.terraform.io/docs/internals/debugging.html) for more details.* Once done, you can just press F5 and the debug will start! You can place breakpoints in your code to do step by step debugging: