Signalfx Provider
Installation
The Signalfx provider is available as a package in all Pulumi languages:
- JavaScript/TypeScript:
@pulumi/signalfx
- Python:
pulumi-signalfx
- Go:
github.com/pulumi/pulumi-signalfx/sdk/v7/go/signalfx
- .NET:
Pulumi.Signalfx
- Java:
com.pulumi/signalfx
Overview
The Splunk Observability Cloud provider, formerly known as SignalFx Pulumi provider, lets you interact with the resources supported by Splunk Observability Cloud. You must configure the provider with credentials before using it.
Use the navigation to learn more about the available resources.
Learn about Splunk Observability Cloud
To learn more about Splunk Observability Cloud and its features, see the official documentation.
You can use the SignalFlow programming language to create charts and detectors using programText
. For more information about SignalFlow, see the Splunk developer documentation.
Authentication
When authenticating to the Splunk Observability Cloud API you can use:
- An Org token.
- A Session token.
- A Service account.
See Authenticate API Requests in the Splunk developer documentation.
Session tokens are short-lived and provide administrative permissions to edit integrations. They expire relatively quickly, but let you manipulate some sensitive resources. Resources that require session tokens are flagged in their documentation.
A Service account is term used when a user is created within organization that can login via Username and Password, this allows for a Session Token to be created by the pulumi provider and then used throughout the application.
NOTE Separate the less sensitive resources, such as dashboards, from the more sensitive ones, such as integrations, to avoid having to change tokens.
Example
The following example shows how to configure the Splunk Observability Cloud provider for Pulumi:
# Pulumi.yaml provider configuration file
name: configuration-example
runtime: nodejs
config:
signalfx:authToken:
value: 'TODO: "${var.signalfx_auth_token}"'
import * as pulumi from "@pulumi/pulumi";
import * as signalfx from "@pulumi/signalfx";
// Create a new detector
const _default = new signalfx.Detector("default", {});
// Create a new dashboard
const defaultDashboard = new signalfx.Dashboard("default", {});
# Pulumi.yaml provider configuration file
name: configuration-example
runtime: python
config:
signalfx:authToken:
value: 'TODO: "${var.signalfx_auth_token}"'
import pulumi
import pulumi_signalfx as signalfx
# Create a new detector
default = signalfx.Detector("default")
# Create a new dashboard
default_dashboard = signalfx.Dashboard("default")
# Pulumi.yaml provider configuration file
name: configuration-example
runtime: dotnet
config:
signalfx:authToken:
value: 'TODO: "${var.signalfx_auth_token}"'
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using SignalFx = Pulumi.SignalFx;
return await Deployment.RunAsync(() =>
{
// Create a new detector
var @default = new SignalFx.Detector("default");
// Create a new dashboard
var defaultDashboard = new SignalFx.Dashboard("default");
});
# Pulumi.yaml provider configuration file
name: configuration-example
runtime: go
config:
signalfx:authToken:
value: 'TODO: "${var.signalfx_auth_token}"'
package main
import (
"github.com/pulumi/pulumi-signalfx/sdk/v7/go/signalfx"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
// Create a new detector
_, err := signalfx.NewDetector(ctx, "default", nil)
if err != nil {
return err
}
// Create a new dashboard
_, err = signalfx.NewDashboard(ctx, "default", nil)
if err != nil {
return err
}
return nil
})
}
# Pulumi.yaml provider configuration file
name: configuration-example
runtime: yaml
config:
signalfx:authToken:
value: 'TODO: "${var.signalfx_auth_token}"'
resources:
# Create a new detector
default:
type: signalfx:Detector
# Create a new dashboard
defaultDashboard:
type: signalfx:Dashboard
name: default
# Pulumi.yaml provider configuration file
name: configuration-example
runtime: java
config:
signalfx:authToken:
value: 'TODO: "${var.signalfx_auth_token}"'
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.signalfx.Detector;
import com.pulumi.signalfx.Dashboard;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
// Create a new detector
var default_ = new Detector("default");
// Create a new dashboard
var defaultDashboard = new Dashboard("defaultDashboard");
}
}
# Pulumi.yaml provider configuration file
name: configuration-example
runtime: nodejs
config:
signalfx:email:
value: service.account@example
signalfx:organizationId:
value: 'TODO: "${var.service_account_org_id}"'
signalfx:password:
value: 'TODO: "${var.service_account_password}"'
# Pulumi.yaml provider configuration file
name: configuration-example
runtime: python
config:
signalfx:email:
value: service.account@example
signalfx:organizationId:
value: 'TODO: "${var.service_account_org_id}"'
signalfx:password:
value: 'TODO: "${var.service_account_password}"'
# Pulumi.yaml provider configuration file
name: configuration-example
runtime: dotnet
config:
signalfx:email:
value: service.account@example
signalfx:organizationId:
value: 'TODO: "${var.service_account_org_id}"'
signalfx:password:
value: 'TODO: "${var.service_account_password}"'
# Pulumi.yaml provider configuration file
name: configuration-example
runtime: go
config:
signalfx:email:
value: service.account@example
signalfx:organizationId:
value: 'TODO: "${var.service_account_org_id}"'
signalfx:password:
value: 'TODO: "${var.service_account_password}"'
# Pulumi.yaml provider configuration file
name: configuration-example
runtime: yaml
config:
signalfx:email:
value: service.account@example
signalfx:organizationId:
value: 'TODO: "${var.service_account_org_id}"'
signalfx:password:
value: 'TODO: "${var.service_account_password}"'
# Pulumi.yaml provider configuration file
name: configuration-example
runtime: java
config:
signalfx:email:
value: service.account@example
signalfx:organizationId:
value: 'TODO: "${var.service_account_org_id}"'
signalfx:password:
value: 'TODO: "${var.service_account_password}"'
Configuration Reference
The following configuration inputs are supported:
authToken
- (Required) The auth token for authentication. You can also set it using theSFX_AUTH_TOKEN
environment variable.apiUrl
- (Optional) The API URL to use for communicating with Splunk Observability Cloud. This is helpful for organizations that need to set their realm or use a proxy. You can also set it using theSFX_API_URL
environment variable.customAppUrl
- (Optional) The application URL that users might use to interact with assets in the browser. Used by organizations on specific realms or with a custom SSO domain. You can also set it using theSFX_CUSTOM_APP_URL
environment variable.timeoutSeconds
- (Optional) The total timeout duration to wait when making HTTP API calls to Splunk Observability Cloud, in seconds. Defaults to120
.retryMaxAttempts
- (Optional) The number of retry attempts when making HTTP API calls to Splunk Observability Cloud. Defaults to4
.retryWaitMinSeconds
- (Optional) The minimum wait time between retry attempts when making HTTP API calls to Splunk Observability Cloud, in seconds. Defaults to1
.retryWaitMaxSeconds
- (Optional) The maximum wait time between retry attempts when making HTTP API calls to Splunk Observability Cloud, in seconds. Defaults to30
.email
- (Optional) The provided email address is used to generate a Session Token that is then used for all API interactions. Requires email address to be configured with a password, and not via SSO.password
- (Optional) The password is used to authenticate the email provided to generate a Session Token. Requires email address to be configured with a password, and not via SSO.organizationId
- (Optional) The organisation id is used to select which organization if the user provided belongs to multiple.