/sumologic-terraform-provider

Terraform provider for Sumo Logic.

Primary LanguageGoApache License 2.0Apache-2.0

Build Status contributions welcome

terraform-provider-sumologic

This provider is used to manage Hosted collectors and sources supported by Sumo Logic.

Support

The code in this repository has been developed in collaboration with the Sumo Logic community and is not supported via standard Sumo Logic Support channels. For any issues or questions please submit an issue within the GitHub repository. The maintainers of this project will work directly with the community to answer any questions, address bugs, or review any requests for new features.

License

Released under Apache 2.0 License.

Usage

The provider needs to be configured with the proper credentials before it can be used. You must provide an Access ID and Access Key to use this provider.

Authentication

The Sumo Logic Provider offers a flexible means of providing credentials for authentication. The following methods are supported and explained below:

  • Static credentials
  • Environment variables

Static credentials

Static credentials can be provided by adding an access_id and access_key in-line in the Sumo Logic provider block:

Usage:

provider "sumologic" {
    access_id   = "your-access-id"
    access_key  = "your-access-key"
}

Environment variables

You can provide your credentials via the SUMOLOGIC_ACCESSID and SUMOLOGIC_ACCESSKEY environment variables, representing your Sumo Logic Access ID and Sumo Logic Access Key, respectively.

Usage:

provider "sumologic" { }
$ export SUMOLOGIC_ACCESSID="your-access-id"
$ export SUMOLOGIC_ACCESSKEY="your-access-id"
$ terraform plan

Argument Reference

  • access_id - (Optional) This is the Sumo Logic Access ID. It must be provided, but it can also be sourced from the SUMOLOGIC_ACCESSID environment variable.
  • access_key - (Optional) This is the Sumo Logic Access Key. It must be provided, but it can also be sourced from the SUMOLOGIC_ACCESSKEY environment variable.
  • environment - (Optional) This is the API endpoint to use. Default is us2, but it can also be sourced from the SUMOLOGIC_ENVIRONMENT environment variable. See the Sumo Logic documentation for details on which environment you should use.

Building the provider

In this section you will learn how to build and run terraform-provider-sumologic locally. Please follow the steps below:

Requirements

Build and install

make install