Skip to content

Commit 9ee8a53

Browse files
authored
Merge pull request microsoft#50 from jlpedrosa/contrib_docs_env_options
Add the configuration to use the integrated UI in vscode
2 parents 431c9e0 + 9a88dd7 commit 9ee8a53

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

provider/CONTRIBUTE.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,20 @@ ARM_TEST_LOCATION_ALT=<AZURE_LOCATION_2>
131131
TF_ACC=1
132132
```
133133

134+
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
135+
* Use the built in variables definition:
136+
```json
137+
"go.testEnvVars": {
138+
"ARM_CLIENT_ID" : "<YOUR_SERVICE_PRINCIPAL_CLIENT_ID>"
139+
...
140+
...
141+
},
142+
```
143+
* Use the contents of a file as `private.env`
144+
```json
145+
"go.testEnvFile": "${workspaceRoot}/.vscode/private.env"
146+
```
147+
134148
*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.*
135149

136150
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:

0 commit comments

Comments
 (0)