terraform-provider-incidentio

command module
v0.0.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 18, 2023 License: MPL-2.0 Imports: 5 Imported by: 0

README

Terraform Provider for incident.io

This Terraform provider helps you to configure your incident.io account.

  1. Get an API key in https://app.incident.io/settings/api-keys
  2. Configure https://incident.io using the provider:
terraform {
  required_providers {
    incidentio = {
      source = "multani/incidentio"
    }
  }
}

variable "incidentio_api_key" {
  description = <<EOF
An incident.io API key.

Get one at https://app.incident.io/settings/api-keys
EOF
}

provider "incidentio" {
  api_key = var.incidentio_api_key
}

resource "incidentio_incident_role" "spectator" {
  name        = "Spectator"
  short_form  = "spectator"
  description = "A person that enjoys eating popcorn when things are burning."

  instructions = <<EOF
- Grab some popcorn
- Silently watch the incident happening
- Congrat the other roles once the incident has been resolved
EOF

  # This role is mostly probably not required, most of the time.
  required   = false
}

Requirements

Building The Provider

  1. Clone the repository
  2. Enter the repository directory
  3. Build the provider using the Go install command:
go install

Adding Dependencies

This provider uses Go modules. Please see the Go documentation for the most up to date information about using Go modules.

To add a new dependency github.com/author/dependency to your Terraform provider:

go get github.com/author/dependency
go mod tidy

Then commit the changes to go.mod and go.sum.

Using the provider

Fill this in for each provider

Developing the Provider

If you wish to work on the provider, you'll first need Go installed on your machine (see Requirements above).

To compile the provider, run go install. This will build the provider and put the provider binary in the $GOPATH/bin directory.

To generate or update documentation, run go generate.

In order to run the full suite of Acceptance tests, run make testacc. You will need a valid incident.io API key that you can get from https://app.incident.io/settings/api-keys and export it as the INCIDENT_IO_API_KEY environment variable.

Note: Acceptance tests create real resources, and often cost money to run.

export INCIDENT_IO_API_KEY="xxx"
make testacc

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL