1. Packages
  2. Statsig Provider
Statsig v0.0.1 published on Friday, Jun 6, 2025 by Statsig

Statsig Provider

statsig logo
Statsig v0.0.1 published on Friday, Jun 6, 2025 by Statsig

    The Statsig provider is used to interact with resources supported by Statsig. The provider needs to be configured with the proper credentials before it can be used.

    Example Usage

    # Pulumi.yaml provider configuration file
    name: configuration-example
    runtime: nodejs
    config:
        statsig:consoleApiKey:
            value: 'TODO: var.console_api_key'
    
    import * as pulumi from "@pulumi/pulumi";
    import * as statsig from "@statsig/pulumi-statsig";
    
    // Create a Feature Gate
    const gate = new Statsig.Gate("my-gate", {});
    
    # Pulumi.yaml provider configuration file
    name: configuration-example
    runtime: python
    config:
        statsig:consoleApiKey:
            value: 'TODO: var.console_api_key'
    
    import pulumi
    import pulumi_statsig as statsig
    
    # Create a Feature Gate
    gate = statsig.Gate("my-gate")
    
    # Pulumi.yaml provider configuration file
    name: configuration-example
    runtime: dotnet
    config:
        statsig:consoleApiKey:
            value: 'TODO: var.console_api_key'
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Statsig = Statsig.Pulumi;
    
    return await Deployment.RunAsync(() =>
    {
        // Create a Feature Gate
        var gate = new Statsig.Gate("my-gate");
    
    });
    
    # Pulumi.yaml provider configuration file
    name: configuration-example
    runtime: go
    config:
        statsig:consoleApiKey:
            value: 'TODO: var.console_api_key'
    
    package main
    
    import (
      "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/statsig-io/pulumi-statsig/sdk/go/statsig"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		// Create a Feature Gate
    		_, err := statsig.NewGate(ctx, "my-gate", nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    statsig logo
    Statsig v0.0.1 published on Friday, Jun 6, 2025 by Statsig