Giter VIP home page Giter VIP logo

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.

    • For example, you can generate a personal access key in stag-alpha here. Once your test runs, you are then capable of viewing the real resources created by Terraform in the stag-alpha UI.
      $ export SUMOLOGIC_ACCESSID="yourAccessID"
      $ export SUMOLOGIC_ACCESSKEY="yourAccessKey"
      $ export SUMOLOGIC_ENVIRONMENT="stag"
      $ export SUMOLOGIC_BASE_URL="https://stag-api.sumologic.net/api/"
      $ export TF_ACC=1
    • More information on configuration can be found at the Terraform Provider codelabs documentation.
  • 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.

terraform-provider-sumologic's People

Contributors

sumovishal avatar pmontiel-sumo avatar seansain avatar frankreno avatar vsinghal13 avatar rsanbhad avatar dagould avatar kumar-avijit avatar emichaeli avatar rmamilla-sumo avatar mccartney avatar ndhar-sumo avatar agaurav avatar mzochowskisumo avatar troy-q-li avatar yuting-liu avatar tarunk2 avatar gourav2906 avatar avadheshkaria avatar apoorv-garg avatar jinkane avatar ksbagr avatar heldersepu avatar kachristensen avatar ayiusumo avatar bendrucker avatar dkluba avatar josh-williams avatar stevenxqli avatar alex-reichle avatar

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.