Giter VIP home page Giter VIP logo

terraform-provider-lightstep's Introduction

Lightstep Terraform Provider

In August 2023, Lightstep became ServiceNow Cloud Observability. To ease the transition, all code artifacts will continue to use the Lightstep name. You don't need to do anything to keep using this provider.

Requirements

Using the provider

  • Install Terraform
  • Write some code to initialize the provider with your Lightstep organization and API Key with member permissions:
terraform {
  required_providers {
    lightstep = {
      source = "lightstep/lightstep"
      version = "1.77.2"
    }
  }
}

provider "lightstep" {
  api_key         = "your-lightstep-org-api-key"
  organization    = "your-lightstep-organization"
}

# Example: Create AWS EC2 Dashboard
module "aws-dashboards" {
  source            = "lightstep/aws-dashboards/lightstep//modules/ec2-dashboard"
  lightstep_project = "your-lightstep-project"
}
  • Run terraform init
  • Add some code to define dashboards, streams, alerts, and more. See documentation for examples or use pre-built Lightstep Terraform modules.
  • After setting an environment variable with your API Key that matches the name in the provider configuration above, run terraform plan to preview changes.

โš ๏ธ If you're creating many Lightstep resources at once, we recommend running the apply with the parallelism flag set to a low value to avoid API 500 errors:

   # Avoids 500 errors when creating many resources.
   terraform apply -parallelism=1

Development

See DEVELOPMENT.md.

Exporter

It's possible to export an existing Lightstep dashboard to HCL code using the provider. This allows you to generate terrform code for a dashboard you created in the Lightstep UI ("reverse terraform").

The exporter utility is built-in to the provider binary and requires certain environment variables to be set:

For the LIGHTSTEP_ENV variable:

  • public = app.lightstep.com
  • meta = app-meta.lightstep.com
  • staging = app-staging.lightstep.com
$ export LIGHTSTEP_API_KEY=....
$ export LIGHTSTEP_ORG=your-org
$ export LIGHTSTEP_ENV=public

# exports to console dashboard id = rZbPJ33q from project terraform-shop
$ go run github.com/lightstep/terraform-provider-lightstep exporter lightstep_dashboard terraform-shop rZbPJ33q

terraform-provider-lightstep's People

Contributors

ishg avatar cboppert avatar mistersquishy avatar bcronin avatar lambcode avatar smithclay avatar dantulovsky avatar paivagustavo avatar danhurwit avatar gdfast avatar ltyson avatar mi-lee avatar wfro avatar rafaeljesus avatar mattcarmody avatar dolphinsgrin avatar carolynblumberg avatar benpbrown avatar gdvalle avatar frenchfrywpepper avatar dependabot[bot] avatar amburvill avatar isaaczinda avatar heidmotron avatar neilwa 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.