Giter Site home page Giter Site logo

sumologic / terraform-provider-sumologic Goto Github PK

View Code? Open in Web Editor NEW
37.0 33.0 54.0 17.24 MB

Terraform provider for Sumo Logic

Home Page: https://www.terraform.io/docs/providers/sumologic/

License: Mozilla Public License 2.0

Makefile 0.21% Go 99.44% Shell 0.11% HTML 0.23%
sumologic terraform-provider terraform

terraform-provider-sumologic's Introduction

Terraform logo

Terraform Provider for Sumo Logic

The Terraform Sumo Logic provider is a plugin for Terraform that allows for the full lifecycle management of Sumo Logic resources.

This provider is maintained by Sumo Logic.

Getting started

Using the provider

Run terraform init to automatically install the latest version of the provider.

Requirements

Developing the provider

If you wish to work on the provider, you'll first need Go installed on your machine. You'll also need to correctly setup a GOPATH, as well as adding $GOPATH/bin to your $PATH.

Clone repository to: $GOPATH/src/SumoLogic/sumologic-terraform-provider

$ mkdir -p $GOPATH/src/SumoLogic;
$ cd $GOPATH/src/SumoLogic
$ git clone https://github.com/SumoLogic/terraform-provider-sumologic.git

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.

$ cd $GOPATH/src/SumoLogic/terraform-provider-sumologic
$ make build

Testing the provider

In order to test the provider, you can run make test.

For manual testing, run make install in the root directory to install it as a plugin. Then run terraform init to initialize it.

In order to run the full suite of Acceptance tests, run make testacc.

To run a specific acceptance test, run go test -v ./sumologic -run YourSpecificTestName

Note:

  • 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.

    $ export SUMOLOGIC_ACCESSID="yourAccessID"
    $ export SUMOLOGIC_ACCESSKEY="yourAccessKey"
    $ export SUMOLOGIC_ENVIRONMENT="yourEnvironment"
    $ export SUMOLOGIC_BASE_URL="yourEnvironmentAPIUrl"
    $ export TF_ACC=1
    • More information on configuration can be found here.
  • Environment variable SUMOLOGIC_TEST_GOOGLE_APPLICATION_CREDENTIALS must be set for gcp metrics acceptance tests to work properly (ex. below).

    • export SUMOLOGIC_TEST_GOOGLE_APPLICATION_CREDENTIALS=cat /path/to/service_acccount.json
    • Set Environment variable SUMOLOGIC_ENABLE_GCP_METRICS_ACC_TESTS to false, to disable acceptance test for Gcp Metrics.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.