You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-[Go](https://golang.org/doc/install) > 1.15 (to build the provider plugin)
28
+
- If you wish to work on the provider, you'll first need [Go](http://www.golang.org) installed on your machine
29
+
(version 1.15+ is *required*). You'll also need to correctly setup a [GOPATH](http://golang.org/doc/code.html#GOPATH), as well as adding `$GOPATH/bin` to your `$PATH`.
23
30
24
-
Clone repository to: `$GOPATH/src/github.com/draios/terraform-provider-sysdig`
31
+
#### - Developing
32
+
33
+
First **clone** source repository to: `$GOPATH/src/github.com/draios/terraform-provider-sysdig`
If you're building the provider, follow the instructions to [install it as a plugin.](https://www.terraform.io/docs/plugins/basics.html#installing-a-plugin) After placing it into your plugins directory, run `terraform init` to initialize it.
35
-
36
-
37
-
Contribute
38
-
---------------------------
39
-
40
-
If you wish to work on the provider, you'll first need [Go](http://www.golang.org) installed on your machine (version 1.13+ is *required*). You'll also need to correctly setup a [GOPATH](http://golang.org/doc/code.html#GOPATH), as well as adding `$GOPATH/bin` to your `$PATH`.
41
41
42
-
To compile the provider, run `make build`. This will build the provider and put the provider binary in the `$GOPATH/bin` directory.
42
+
To **compile** the provider, run `make build`. This will build the provider and put the provider binary in the `$GOPATH/bin` directory.
In order to test the provider, you can simply run `make test`.
51
+
In order to **test** the provider, you can simply run `make test`.
52
52
53
53
```sh
54
54
$ make test
55
55
```
56
56
57
-
If you want to execute the acceptance tests, you can run `make testacc`.
57
+
If you want to execute the **acceptance tests**, you can run `make testacc`.
58
58
59
59
```sh
60
60
$ make testacc
61
61
```
62
62
63
-
To use the local provider you just built, get it installed in your machine with:
63
+
To use the local provider you just built, follow the instructions to [**install**it as a plugin.](https://www.terraform.io/docs/plugins/basics.html#installing-a-plugin) in your machine with:
64
64
65
65
```sh
66
66
$ make install
67
67
```
68
68
69
-
That will add the provider to the terraform plugins dir. Then just set `source` and `version` values appropiately:
69
+
That will add the provider to the terraform plugins dir. Then just set `source` and `version` values appropriately:
70
70
71
-
```
71
+
```terraform
72
72
provider "aws" {
73
73
region = my_region
74
74
}
@@ -85,39 +85,52 @@ terraform {
85
85
86
86
To uninstall the plugin:
87
87
88
-
```
88
+
```sh
89
89
$ make uninstall
90
90
```
91
91
92
-
93
92
<br/>:warning:Please note that you need a token for Monitor and Secure, and since the **acceptance tests create real infrastructure**
94
93
you should execute them in an environment where you can remove the resorces easily.
95
94
96
95
97
96
98
-
### Creating new resource / data sources
97
+
### - Creating new resource / data sources
99
98
100
99
TL;DR;
101
100
- Create the resource/data source item
102
101
- Add the created item into the `provider.go` resource or datasource map with its wiring
103
-
- With its [acceptance test](https://www.terraform.io/plugin/sdkv2/testing/acceptance-tests)
104
-
- Add its documentation page on `./website/docs/`
102
+
- With its [acceptance **test**](https://www.terraform.io/plugin/sdkv2/testing/acceptance-tests)
103
+
- Add its **documentation** page on `./website/docs/`
* if it's your first time, validate you're taking into account every aspect of the [`./github/pull_request_template`](.github/pull_request_template.md)
113
114
* on pull-requests some validations are enforced.
114
-
this can be prevented using [**pre-commit**](https://pre-commit.com)
115
-
* Defined in [`/.pre-commit-config.yaml`](https://github.com/sysdiglabs/terraform-provider-sysdig/blob/master/.pre-commit-config.yaml)
116
-
* for `testacc` some credentials are required, check [`/.envrc.template`](https://github.com/sysdiglabs/terraform-provider-sysdig/blob/master/.envrc.template)
115
+
- Defined in [`/.pre-commit-config.yaml`](https://github.com/sysdiglabs/terraform-provider-sysdig/blob/master/.pre-commit-config.yaml)
116
+
- You can work on this before even pushing to remote, using [**pre-commit**](https://pre-commit.com) plugin
117
+
118
+
* for Acceptance Tests `testacc` some credentials are required, check [`/.envrc.template`](https://github.com/sysdiglabs/terraform-provider-sysdig/blob/master/.envrc.template)
117
119
118
120
119
-
### Release
121
+
### - Release
120
122
121
-
* Use **semver** for releases https://semver.org
122
-
* To create a new release, create and push a new tag and it will be released by [`/.github/workflows/release.yml`](https://github.com/sysdiglabs/terraform-provider-sysdig/blob/master/.github/workflows/release.yml)
123
+
To create a new release, create and push a new **tag**, and it will be released following [`/.
0 commit comments