Working with Observe and Terraform

The Observe provider allows you to interact with resources supported by Observe.

Example Usage

terraform {
  required_providers {
    observe = {
      source  = "terraform.observeinc.com/observeinc/observe"
      version = "~> 0.11"
    }
  }
}

# Configure the observe provider
provider "observe" {}

# Look up existing workspace 
data "observe_workspace" "default" {
  name = "Default"
}

Authentication and Configuration

You must provide a customer ID and authentication in order to interact with the Observe API.

Authentication might be via bearer token or via credentials.

The provider can either be configured explicitly through parameters or through environment variables. Explicit configuration always takes precedence over environment variables:

provider "observe" {
  customer      = "123456789012"
  user_email    = "[email protected]"
  user_password = "secret"
}

Every parameter in the provider schema has a corresponding environment variable composed by prefixing the upper cased parameter name with OBSERVE_:

export OBSERVE_CUSTOMER=123456789012
export OBSERVE_USER_EMAIL=[email protected]
export OBSERVE_USER_PASSWORD=secret
terraform plan
...

Schema

Required

  • customer (String) Your Observe Customer ID.

Optional

  • api_token (String, Sensitive) An Observe API Token. Used for authenticating requests to API in the absence of user_email and user_password.

  • domain (String) Observe API domain. Defaults to observeinc.com.

  • flags (String) Toggle experimental features.

  • http_client_timeout (String) HTTP client timeout. Defaults to 2m.

  • insecure (Boolean) Skip TLS certificate validation.

  • managing_object_id (String) ID of an Observe object that serves as the parent (managing) object for all resources created by the provider (internal use).

  • retry_count (Number) Maximum number of retries on temporary network failures. Defaults to 3.

  • retry_wait (String) Time between retries. Defaults to 3s.

  • source_comment (String) Source identifier comment. If null, fallback to user_email.

  • source_format (String) Source identifier format.

  • user_email (String) User email. If supplied, user_password is also required.

  • user_password (String, Sensitive) Password for provided user_email.

Templates

Data Sources

Resources