Skip to content

Commit 9a78fe6

Browse files
committed
provider contribute guide
1 parent 69b2da1 commit 9a78fe6

File tree

5 files changed

+75
-0
lines changed

5 files changed

+75
-0
lines changed

provider/CONTRIBUTE.md

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# Contribute to Terraform AzureRM provider
2+
3+
This document describe how you can get ready to contribute to the [AzureRM Terraform provider](https://github.com/terraform-providers/terraform-provider-azurerm).
4+
5+
## Setup your system
6+
7+
### Terraform
8+
9+
You need to install Terraform on your dev environment. You can downlaod it from [this page](https://www.terraform.io/downloads.html).
10+
11+
### Go tools
12+
13+
Terraform is developed using Go. You need to install Go **1.11.x** to be able to build and debug the provider locally.
14+
You can download it from [this page](https://golang.org/dl/) and find the installation instructions for your system [here](https://golang.org/doc/install#install)
15+
16+
Then you can test your environment following the instructions on [this page](https://golang.org/doc/install#testing).
17+
18+
### Check you GOPATH
19+
20+
As of many Go project, AzureRM Terraform provider rely on your GOPATH environment variable. You may want to make sure it is well configured for your system, reading [this page](https://github.com/golang/go/wiki/SettingGOPATH).
21+
22+
### Visual Studio Code
23+
24+
You can use the IDE you love, but in this documentation we will describe how to contribute to the Terraform AzureRM provider using Visual Studio Code. You can download it for your system from [this page](https://code.visualstudio.com/Download).
25+
26+
Once installed, download the Go extension for VS Code:
27+
28+
![VS Code Go Extension](assets/ms-vscode-go.png)
29+
30+
Once installed, open VS Code and look for the `Go: Install/Update Tools` in the command palette, a select all the tools:
31+
32+
![Install Go Tools](assets/code-install-go-tools.png)
33+
34+
![Install Go Tools - All](assets/code-install-go-tools-all.png)
35+
36+
![Install Go Tools - Wait](assets/code-install-go-tools-wait.png)
37+
38+
### Specific requirements for Windows users
39+
40+
If you are running Windows, then you need to install Git Bash and Make for Windows. Check the dedicated section on Terraform on Azure repository [here](https://github.com/terraform-providers/terraform-provider-azurerm#windows-specific-requirements).
41+
42+
## Get the sources
43+
44+
First, go to the [AzureRM Terraform provider](https://github.com/terraform-providers/terraform-provider-azurerm) project page and fork the repository into your GitHub account.
45+
46+
Once done, you need to clone your fork into the `$GOPATH/src/github.com/terraform-providers/terraform-provider-azurerm` folder.
47+
48+
You can check that everything is OK by building the AzureRM provider:
49+
50+
```bash
51+
cd $GOPATH/src/github.com/terraform-providers/terraform-provider-azurerm
52+
make build
53+
```
54+
55+
Once completed, the binary of the AzureRM provider should be available in the `$GOPATH/bin` directory.
56+
57+
*Note: on Windows, you need to use Git Bash*
58+
59+
## Work with your local build
60+
61+
Once you have built a new version of the AzureRM Terraform provider, you can use it locally.
62+
63+
**TODO**
64+
65+
## Debug the AzureRM provider using Visual Studio Code and Delve
66+
67+
It is possible to use Visual Studio Code and Delve (the Golang debugger) to debug the AzureRM provider.
68+
69+
**TODO**
70+
71+
## Other
72+
73+
### Slack
74+
75+
You can request an invite to access the Terraform on Azure Slack [here](https://join.slack.com/t/terraform-azure/shared_invite/enQtNDMzNjQ5NzcxMDc3LTJkZTJhNTg3NTE5ZTdjZjFhMThmMTVmOTg5YWJkMDU1YTMzN2YyOWJmZGM3MGI4OTQ0ODQxNTEyNjdjMDAxMjM).
96 KB
Loading
37.8 KB
Loading
8.75 KB
Loading

provider/assets/ms-vscode-go.png

128 KB
Loading

0 commit comments

Comments
 (0)