1. Registry
  2. Packages
  3. Planetscale Provider
  4. API Docs
  5. getPostgresBouncer
Viewing docs for planetscale 1.8.0
published on Thursday, Aug 13, 2026 by planetscale
Viewing docs for planetscale 1.8.0
published on Thursday, Aug 13, 2026 by planetscale

    PostgresBouncer DataSource

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as planetscale from "@pulumi/planetscale";
    
    const myPostgresbouncer = planetscale.getPostgresBouncer({
        branch: "...my_branch...",
        database: "...my_database...",
        name: "...my_name...",
        organization: "...my_organization...",
    });
    
    import pulumi
    import pulumi_planetscale as planetscale
    
    my_postgresbouncer = planetscale.get_postgres_bouncer(branch="...my_branch...",
        database="...my_database...",
        name="...my_name...",
        organization="...my_organization...")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/planetscale/planetscale"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := planetscale.LookupPostgresBouncer(ctx, &planetscale.LookupPostgresBouncerArgs{
    			Branch:       "...my_branch...",
    			Database:     "...my_database...",
    			Name:         "...my_name...",
    			Organization: "...my_organization...",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Planetscale = Pulumi.Planetscale;
    
    return await Deployment.RunAsync(() => 
    {
        var myPostgresbouncer = Planetscale.GetPostgresBouncer.Invoke(new()
        {
            Branch = "...my_branch...",
            Database = "...my_database...",
            Name = "...my_name...",
            Organization = "...my_organization...",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.planetscale.PlanetscaleFunctions;
    import com.pulumi.planetscale.inputs.GetPostgresBouncerArgs;
    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) {
            final var myPostgresbouncer = PlanetscaleFunctions.getPostgresBouncer(GetPostgresBouncerArgs.builder()
                .branch("...my_branch...")
                .database("...my_database...")
                .name("...my_name...")
                .organization("...my_organization...")
                .build());
    
        }
    }
    
    variables:
      myPostgresbouncer:
        fn::invoke:
          function: planetscale:getPostgresBouncer
          arguments:
            branch: '...my_branch...'
            database: '...my_database...'
            name: '...my_name...'
            organization: '...my_organization...'
    
    Example coming soon!
    

    Using getPostgresBouncer

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getPostgresBouncer(args: GetPostgresBouncerArgs, opts?: InvokeOptions): Promise<GetPostgresBouncerResult>
    function getPostgresBouncerOutput(args: GetPostgresBouncerOutputArgs, opts?: InvokeOutputOptions): Output<GetPostgresBouncerResult>
    def get_postgres_bouncer(branch: Optional[str] = None,
                             database: Optional[str] = None,
                             name: Optional[str] = None,
                             organization: Optional[str] = None,
                             opts: Optional[InvokeOptions] = None) -> GetPostgresBouncerResult
    def get_postgres_bouncer_output(branch: pulumi.Input[Optional[str]] = None,
                             database: pulumi.Input[Optional[str]] = None,
                             name: pulumi.Input[Optional[str]] = None,
                             organization: pulumi.Input[Optional[str]] = None,
                             opts: Optional[InvokeOutputOptions] = None) -> Output[GetPostgresBouncerResult]
    func LookupPostgresBouncer(ctx *Context, args *LookupPostgresBouncerArgs, opts ...InvokeOption) (*LookupPostgresBouncerResult, error)
    func LookupPostgresBouncerOutput(ctx *Context, args *LookupPostgresBouncerOutputArgs, opts ...InvokeOption) LookupPostgresBouncerResultOutput

    > Note: This function is named LookupPostgresBouncer in the Go SDK.

    public static class GetPostgresBouncer 
    {
        public static Task<GetPostgresBouncerResult> InvokeAsync(GetPostgresBouncerArgs args, InvokeOptions? opts = null)
        public static Output<GetPostgresBouncerResult> Invoke(GetPostgresBouncerInvokeArgs args, InvokeOptions? opts = null)
        public static Output<GetPostgresBouncerResult> Invoke(GetPostgresBouncerInvokeArgs args, InvokeOutputOptions opts)
    }
    public static CompletableFuture<GetPostgresBouncerResult> getPostgresBouncer(GetPostgresBouncerArgs args, InvokeOptions options)
    public static Output<GetPostgresBouncerResult> getPostgresBouncer(GetPostgresBouncerArgs args, InvokeOptions options)
    public static Output<GetPostgresBouncerResult> getPostgresBouncer(GetPostgresBouncerArgs args, InvokeOutputOptions options)
    
    fn::invoke:
      function: planetscale:index/getPostgresBouncer:getPostgresBouncer
      arguments:
        # arguments dictionary
    data "planetscale_get_postgres_bouncer" "name" {
        # arguments
    }

    The following arguments are supported:

    Branch string
    Branch name from list_branches. Example: main.
    Database string
    Database name slug from list_databases. Example: app-db.
    Name string
    The name of the bouncer
    Organization string
    Organization name slug from list_organizations. Example: acme.
    Branch string
    Branch name from list_branches. Example: main.
    Database string
    Database name slug from list_databases. Example: app-db.
    Name string
    The name of the bouncer
    Organization string
    Organization name slug from list_organizations. Example: acme.
    branch string
    Branch name from list_branches. Example: main.
    database string
    Database name slug from list_databases. Example: app-db.
    name string
    The name of the bouncer
    organization string
    Organization name slug from list_organizations. Example: acme.
    branch String
    Branch name from list_branches. Example: main.
    database String
    Database name slug from list_databases. Example: app-db.
    name String
    The name of the bouncer
    organization String
    Organization name slug from list_organizations. Example: acme.
    branch string
    Branch name from list_branches. Example: main.
    database string
    Database name slug from list_databases. Example: app-db.
    name string
    The name of the bouncer
    organization string
    Organization name slug from list_organizations. Example: acme.
    branch str
    Branch name from list_branches. Example: main.
    database str
    Database name slug from list_databases. Example: app-db.
    name str
    The name of the bouncer
    organization str
    Organization name slug from list_organizations. Example: acme.
    branch String
    Branch name from list_branches. Example: main.
    database String
    Database name slug from list_databases. Example: app-db.
    name String
    The name of the bouncer
    organization String
    Organization name slug from list_organizations. Example: acme.

    getPostgresBouncer Result

    The following output properties are available:

    Actor GetPostgresBouncerActor
    BouncerSize string
    The bouncer size, e.g. PGB_5, PGB_10, PGB_20, PGB_40, PGB_80, or PGB_160. Defaults to PGB_5.
    Branch string
    Branch name from list_branches. Example: main.
    Database string
    Database name slug from list_databases. Example: app-db.
    Id string
    The ID of the bouncer
    Name string
    The name of the bouncer
    Organization string
    Organization name slug from list_organizations. Example: acme.
    Parameters Dictionary<string, ImmutableDictionary<string, string>>
    PgBouncer parameter overrides, nested by namespace, e.g. { pgbouncer = { defaultpoolsize = "100" } }. Omitted parameters are reset to their defaults.
    ReplicasPerCell double
    The number of PgBouncer instances per availability zone. Defaults to 1.
    Target string
    The servers the bouncer routes connections to: primary, replica, or replica_az_affinity (replicas in the same availability zone as the bouncer).
    Actor GetPostgresBouncerActor
    BouncerSize string
    The bouncer size, e.g. PGB_5, PGB_10, PGB_20, PGB_40, PGB_80, or PGB_160. Defaults to PGB_5.
    Branch string
    Branch name from list_branches. Example: main.
    Database string
    Database name slug from list_databases. Example: app-db.
    Id string
    The ID of the bouncer
    Name string
    The name of the bouncer
    Organization string
    Organization name slug from list_organizations. Example: acme.
    Parameters map[string]map[string]string
    PgBouncer parameter overrides, nested by namespace, e.g. { pgbouncer = { defaultpoolsize = "100" } }. Omitted parameters are reset to their defaults.
    ReplicasPerCell float64
    The number of PgBouncer instances per availability zone. Defaults to 1.
    Target string
    The servers the bouncer routes connections to: primary, replica, or replica_az_affinity (replicas in the same availability zone as the bouncer).
    actor object
    bouncer_size string
    The bouncer size, e.g. PGB_5, PGB_10, PGB_20, PGB_40, PGB_80, or PGB_160. Defaults to PGB_5.
    branch string
    Branch name from list_branches. Example: main.
    database string
    Database name slug from list_databases. Example: app-db.
    id string
    The ID of the bouncer
    name string
    The name of the bouncer
    organization string
    Organization name slug from list_organizations. Example: acme.
    parameters map(map(string))
    PgBouncer parameter overrides, nested by namespace, e.g. { pgbouncer = { defaultpoolsize = "100" } }. Omitted parameters are reset to their defaults.
    replicas_per_cell number
    The number of PgBouncer instances per availability zone. Defaults to 1.
    target string
    The servers the bouncer routes connections to: primary, replica, or replica_az_affinity (replicas in the same availability zone as the bouncer).
    actor GetPostgresBouncerActor
    bouncerSize String
    The bouncer size, e.g. PGB_5, PGB_10, PGB_20, PGB_40, PGB_80, or PGB_160. Defaults to PGB_5.
    branch String
    Branch name from list_branches. Example: main.
    database String
    Database name slug from list_databases. Example: app-db.
    id String
    The ID of the bouncer
    name String
    The name of the bouncer
    organization String
    Organization name slug from list_organizations. Example: acme.
    parameters Map<String,Map<String,String>>
    PgBouncer parameter overrides, nested by namespace, e.g. { pgbouncer = { defaultpoolsize = "100" } }. Omitted parameters are reset to their defaults.
    replicasPerCell Double
    The number of PgBouncer instances per availability zone. Defaults to 1.
    target String
    The servers the bouncer routes connections to: primary, replica, or replica_az_affinity (replicas in the same availability zone as the bouncer).
    actor GetPostgresBouncerActor
    bouncerSize string
    The bouncer size, e.g. PGB_5, PGB_10, PGB_20, PGB_40, PGB_80, or PGB_160. Defaults to PGB_5.
    branch string
    Branch name from list_branches. Example: main.
    database string
    Database name slug from list_databases. Example: app-db.
    id string
    The ID of the bouncer
    name string
    The name of the bouncer
    organization string
    Organization name slug from list_organizations. Example: acme.
    parameters {[key: string]: {[key: string]: string}}
    PgBouncer parameter overrides, nested by namespace, e.g. { pgbouncer = { defaultpoolsize = "100" } }. Omitted parameters are reset to their defaults.
    replicasPerCell number
    The number of PgBouncer instances per availability zone. Defaults to 1.
    target string
    The servers the bouncer routes connections to: primary, replica, or replica_az_affinity (replicas in the same availability zone as the bouncer).
    actor GetPostgresBouncerActor
    bouncer_size str
    The bouncer size, e.g. PGB_5, PGB_10, PGB_20, PGB_40, PGB_80, or PGB_160. Defaults to PGB_5.
    branch str
    Branch name from list_branches. Example: main.
    database str
    Database name slug from list_databases. Example: app-db.
    id str
    The ID of the bouncer
    name str
    The name of the bouncer
    organization str
    Organization name slug from list_organizations. Example: acme.
    parameters Mapping[str, Mapping[str, str]]
    PgBouncer parameter overrides, nested by namespace, e.g. { pgbouncer = { defaultpoolsize = "100" } }. Omitted parameters are reset to their defaults.
    replicas_per_cell float
    The number of PgBouncer instances per availability zone. Defaults to 1.
    target str
    The servers the bouncer routes connections to: primary, replica, or replica_az_affinity (replicas in the same availability zone as the bouncer).
    actor Property Map
    bouncerSize String
    The bouncer size, e.g. PGB_5, PGB_10, PGB_20, PGB_40, PGB_80, or PGB_160. Defaults to PGB_5.
    branch String
    Branch name from list_branches. Example: main.
    database String
    Database name slug from list_databases. Example: app-db.
    id String
    The ID of the bouncer
    name String
    The name of the bouncer
    organization String
    Organization name slug from list_organizations. Example: acme.
    parameters Map<Map<String>>
    PgBouncer parameter overrides, nested by namespace, e.g. { pgbouncer = { defaultpoolsize = "100" } }. Omitted parameters are reset to their defaults.
    replicasPerCell Number
    The number of PgBouncer instances per availability zone. Defaults to 1.
    target String
    The servers the bouncer routes connections to: primary, replica, or replica_az_affinity (replicas in the same availability zone as the bouncer).

    Supporting Types

    GetPostgresBouncerActor

    Id string
    The ID of the actor
    Id string
    The ID of the actor
    id string
    The ID of the actor
    id String
    The ID of the actor
    id string
    The ID of the actor
    id str
    The ID of the actor
    id String
    The ID of the actor

    Package Details

    Repository
    planetscale planetscale/terraform-provider-planetscale
    License
    Notes
    This Pulumi package is based on the planetscale Terraform Provider.
    Viewing docs for planetscale 1.8.0
    published on Thursday, Aug 13, 2026 by planetscale

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial