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.13 (to build the provider plugin)
19
+
- Set [`$GOPATH`](http://golang.org/doc/code.html#GOPATH)
20
+
- Add `$GOPATH/bin` to your `$PATH`
21
+
-[Sumo Logic](https://www.sumologic.com/)
22
+
15
23
## Getting started
16
24
17
-
[Using the provider](https://www.terraform.io/docs/providers/sumologic/)
25
+
Add the Sumo Logic provider to your terraform configuration:
18
26
19
-
Run `terraform init` to automatically install the latest version of the provider.
27
+
```
28
+
terraform {
29
+
required_providers {
30
+
sumologic = {
31
+
source = "sumologic/sumologic"
32
+
version = "" # set the Sumo Logic Terraform Provider version
33
+
}
34
+
}
35
+
}
36
+
```
20
37
21
-
Requirements
22
-
------------
38
+
Run `terraform init` to automatically install the selected version of the provider.
23
39
24
-
-[Terraform](https://www.terraform.io/downloads.html) 0.12.x, 0.13x, or 0.14x
25
-
-[Go](https://golang.org/doc/install) >= 1.13 (to build the provider plugin)
26
-
-[Sumo Logic](https://www.sumologic.com/)
40
+
See the [provider documentation](https://www.terraform.io/docs/providers/sumologic/) for information on the supported resources and example usage.
27
41
28
42
## Developing the provider
29
43
30
-
If you wish to work on the provider, you'll first need [Go](http://www.golang.org) installed on your machine. 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`.
31
-
32
-
Clone repository to: `$GOPATH/src/SumoLogic/sumologic-terraform-provider`
Enter the provider directory and build the provider. To compile the provider, run `make build`. This will build the provider and put the provider binary in the `$GOPATH/bin` directory.
52
+
This will build the provider and put the provider binary in the `$GOPATH/bin` directory.
53
+
54
+
### Run locally-built provider
55
+
56
+
- Run `make install-dev`
57
+
- Update the provider source in your configuration file:
> **Note:** Acceptance tests create real resources, and often cost money to run.
48
73
49
-
In order to test the provider, you can run `make test`.
74
+
### Configuration
50
75
51
-
For manual testing, run `make install` in the root directory to install it as a plugin.
52
-
Then run `terraform init` to initialize it.
76
+
Create a personal access key for your Sumo Logic account, and set the following environment variables.
53
77
54
-
In order to run the full suite of Acceptance tests, run `make testacc`.
78
+
```sh
79
+
$ export SUMOLOGIC_ACCESSID="yourAccessID"
80
+
$ export SUMOLOGIC_ACCESSKEY="yourAccessKey"
81
+
$ export SUMOLOGIC_ENVIRONMENT="yourEnvironment"
82
+
$ export SUMOLOGIC_BASE_URL="yourEnvironmentAPIUrl"# not required for most production deployments
83
+
$ export TF_ACC=1
84
+
```
85
+
86
+
More information on configuration can be found [here](https://github.com/SumoLogic/terraform-provider-sumologic/blob/master/website/docs/index.html.markdown#environment-variables).
55
87
56
-
To run a specific acceptance test, run `go test -v ./sumologic -run YourSpecificTestName`
88
+
### Run the tests
57
89
58
-
*Note:*
59
-
- Acceptance tests *create real resources*, and often cost money to run. The environment variables `SUMOLOGIC_ACCESSID`, `SUMOLOGIC_ACCESSKEY`, `SUMOLOGIC_ENVIRONMENT` / `SUMOLOGIC_BASE_URL`, and `TF_ACC` must also be set for acceptance tests to work properly. You can generate a personal access key from your environment. Once your test runs, you are then capable of viewing the real resources created by Terraform in the UI.
- More information on configuration can be found [here](https://github.com/SumoLogic/terraform-provider-sumologic/blob/master/website/docs/index.html.markdown#environment-variables).
90
+
```sh
91
+
# Run all acceptance tests:
92
+
$ make testacc
93
+
# Run a specific test:
94
+
$ go test -v ./sumologic -run YourSpecificTestName
95
+
```
68
96
69
-
- Environment variable `SUMOLOGIC_TEST_GOOGLE_APPLICATION_CREDENTIALS` must be setfor gcp metrics acceptance tests to work properly (ex. below).
0 commit comments