Powered by: https://www.terraform.io
Clone repository to: $GOPATH/src/github.com/dikhan/terraform-provider-logentries
$ go get github.com/dikhan/terraform-provider-logentries
Enter the provider directory and build the provider
$ cd $GOPATH/src/github.com/dikhan/terraform-provider-logentries
$ go build
Refer to the READMEs inside the examples folder to see how to configure each resource provided by this terraform provider.
To compile the provider, run go build
. This will build the provider and put the provider binary in the current
$GOPATH/src/github.com/dikhan/terraform-provider-logentries
directory.
$ go build
...
$ ls -la terraform-provider-logentries
...
In order to test the provider, you can simply run:
$ TF_ACC=1 LOGENTRIES_API_KEY="API_KEY" go test $(go list ./...) -timeout 120m -v
Expected output:
$ TF_ACC=1 LOGENTRIES_API_KEY="<API_KEY>" go test $(go list ./...) -timeout 120m -v
? github.com/dikhan/terraform-provider-logentries [no test files]
=== RUN TestLogentriesProvider
--- PASS: TestLogentriesProvider (0.00s)
=== RUN TestAccLogentriesLog_Create
--- PASS: TestAccLogentriesLog_Create (8.81s)
=== RUN TestAccLogentriesLog_Update
--- PASS: TestAccLogentriesLog_Update (11.08s)
=== RUN TestAccLogentriesLogSets_Create
--- PASS: TestAccLogentriesLogSets_Create (0.98s)
=== RUN TestAccLogentriesLogSets_Update
--- PASS: TestAccLogentriesLogSets_Update (1.60s)
=== RUN TestAccLogentriesTags_Create
--- PASS: TestAccLogentriesTags_Create (13.36s)
=== RUN TestAccLogentriesTags_Update
--- PASS: TestAccLogentriesTags_Update (19.71s)
PASS
ok github.com/dikhan/terraform-provider-logentries/logentries 55.636s
Or specific tests can also be executed as follows:
$ TF_ACC=1 LOGENTRIES_API_KEY="<API_KEY>" go test github.com/dikhan/terraform-provider-logentries/logentries -run ^TestAccLogentriesTags_Create$ -timeout 120m -v
The acceptance tests require a LOGENTRIES_API_KEY to be set. This env variable value will be used within the tests to successfully interact with the log entries api.
Note: Acceptance tests create real resources and perform clean up tasks afterwards.
Please follow the guidelines from:
Daniel I. Khan Ramiro
See also the list of contributors who participated in this project.