1. Packages
  2. dbt Cloud Provider
  3. API Docs
  4. SalesforceCredential
dbt Cloud v1.6.0 published on Friday, Feb 20, 2026 by Pulumi
dbtcloud logo
dbt Cloud v1.6.0 published on Friday, Feb 20, 2026 by Pulumi

    Salesforce credential resource

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as dbtcloud from "@pulumi/dbtcloud";
    
    // Create a Salesforce credential for dbt Cloud using JWT Bearer Flow authentication
    const mySalesforceCred = new dbtcloud.SalesforceCredential("my_salesforce_cred", {
        projectId: dbtProject.id,
        username: "user@example.com",
        clientId: "your-oauth-client-id",
        privateKey: "private-key value",
        targetName: "default",
        numThreads: 6,
    });
    
    import pulumi
    import pulumi_dbtcloud as dbtcloud
    
    # Create a Salesforce credential for dbt Cloud using JWT Bearer Flow authentication
    my_salesforce_cred = dbtcloud.SalesforceCredential("my_salesforce_cred",
        project_id=dbt_project["id"],
        username="user@example.com",
        client_id="your-oauth-client-id",
        private_key="private-key value",
        target_name="default",
        num_threads=6)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-dbtcloud/sdk/go/dbtcloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		// Create a Salesforce credential for dbt Cloud using JWT Bearer Flow authentication
    		_, err := dbtcloud.NewSalesforceCredential(ctx, "my_salesforce_cred", &dbtcloud.SalesforceCredentialArgs{
    			ProjectId:  pulumi.Any(dbtProject.Id),
    			Username:   pulumi.String("user@example.com"),
    			ClientId:   pulumi.String("your-oauth-client-id"),
    			PrivateKey: pulumi.String("private-key value"),
    			TargetName: pulumi.String("default"),
    			NumThreads: pulumi.Int(6),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using DbtCloud = Pulumi.DbtCloud;
    
    return await Deployment.RunAsync(() => 
    {
        // Create a Salesforce credential for dbt Cloud using JWT Bearer Flow authentication
        var mySalesforceCred = new DbtCloud.SalesforceCredential("my_salesforce_cred", new()
        {
            ProjectId = dbtProject.Id,
            Username = "user@example.com",
            ClientId = "your-oauth-client-id",
            PrivateKey = "private-key value",
            TargetName = "default",
            NumThreads = 6,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.dbtcloud.SalesforceCredential;
    import com.pulumi.dbtcloud.SalesforceCredentialArgs;
    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 Salesforce credential for dbt Cloud using JWT Bearer Flow authentication
            var mySalesforceCred = new SalesforceCredential("mySalesforceCred", SalesforceCredentialArgs.builder()
                .projectId(dbtProject.id())
                .username("user@example.com")
                .clientId("your-oauth-client-id")
                .privateKey("private-key value")
                .targetName("default")
                .numThreads(6)
                .build());
    
        }
    }
    
    resources:
      # Create a Salesforce credential for dbt Cloud using JWT Bearer Flow authentication
      mySalesforceCred:
        type: dbtcloud:SalesforceCredential
        name: my_salesforce_cred
        properties:
          projectId: ${dbtProject.id}
          username: user@example.com
          clientId: your-oauth-client-id
          privateKey: private-key value
          targetName: default
          numThreads: 6
    

    Create SalesforceCredential Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new SalesforceCredential(name: string, args: SalesforceCredentialArgs, opts?: CustomResourceOptions);
    @overload
    def SalesforceCredential(resource_name: str,
                             args: SalesforceCredentialArgs,
                             opts: Optional[ResourceOptions] = None)
    
    @overload
    def SalesforceCredential(resource_name: str,
                             opts: Optional[ResourceOptions] = None,
                             client_id: Optional[str] = None,
                             private_key: Optional[str] = None,
                             project_id: Optional[int] = None,
                             username: Optional[str] = None,
                             num_threads: Optional[int] = None,
                             target_name: Optional[str] = None)
    func NewSalesforceCredential(ctx *Context, name string, args SalesforceCredentialArgs, opts ...ResourceOption) (*SalesforceCredential, error)
    public SalesforceCredential(string name, SalesforceCredentialArgs args, CustomResourceOptions? opts = null)
    public SalesforceCredential(String name, SalesforceCredentialArgs args)
    public SalesforceCredential(String name, SalesforceCredentialArgs args, CustomResourceOptions options)
    
    type: dbtcloud:SalesforceCredential
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args SalesforceCredentialArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args SalesforceCredentialArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args SalesforceCredentialArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args SalesforceCredentialArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args SalesforceCredentialArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var salesforceCredentialResource = new DbtCloud.SalesforceCredential("salesforceCredentialResource", new()
    {
        ClientId = "string",
        PrivateKey = "string",
        ProjectId = 0,
        Username = "string",
        NumThreads = 0,
        TargetName = "string",
    });
    
    example, err := dbtcloud.NewSalesforceCredential(ctx, "salesforceCredentialResource", &dbtcloud.SalesforceCredentialArgs{
    	ClientId:   pulumi.String("string"),
    	PrivateKey: pulumi.String("string"),
    	ProjectId:  pulumi.Int(0),
    	Username:   pulumi.String("string"),
    	NumThreads: pulumi.Int(0),
    	TargetName: pulumi.String("string"),
    })
    
    var salesforceCredentialResource = new SalesforceCredential("salesforceCredentialResource", SalesforceCredentialArgs.builder()
        .clientId("string")
        .privateKey("string")
        .projectId(0)
        .username("string")
        .numThreads(0)
        .targetName("string")
        .build());
    
    salesforce_credential_resource = dbtcloud.SalesforceCredential("salesforceCredentialResource",
        client_id="string",
        private_key="string",
        project_id=0,
        username="string",
        num_threads=0,
        target_name="string")
    
    const salesforceCredentialResource = new dbtcloud.SalesforceCredential("salesforceCredentialResource", {
        clientId: "string",
        privateKey: "string",
        projectId: 0,
        username: "string",
        numThreads: 0,
        targetName: "string",
    });
    
    type: dbtcloud:SalesforceCredential
    properties:
        clientId: string
        numThreads: 0
        privateKey: string
        projectId: 0
        targetName: string
        username: string
    

    SalesforceCredential Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The SalesforceCredential resource accepts the following input properties:

    ClientId string
    The OAuth connected app client/consumer ID
    PrivateKey string
    The private key for JWT bearer flow authentication
    ProjectId int
    Project ID to create the Salesforce credential in
    Username string
    The Salesforce username for OAuth JWT bearer flow authentication
    NumThreads int
    The number of threads to use for dbt operations
    TargetName string
    Target name
    ClientId string
    The OAuth connected app client/consumer ID
    PrivateKey string
    The private key for JWT bearer flow authentication
    ProjectId int
    Project ID to create the Salesforce credential in
    Username string
    The Salesforce username for OAuth JWT bearer flow authentication
    NumThreads int
    The number of threads to use for dbt operations
    TargetName string
    Target name
    clientId String
    The OAuth connected app client/consumer ID
    privateKey String
    The private key for JWT bearer flow authentication
    projectId Integer
    Project ID to create the Salesforce credential in
    username String
    The Salesforce username for OAuth JWT bearer flow authentication
    numThreads Integer
    The number of threads to use for dbt operations
    targetName String
    Target name
    clientId string
    The OAuth connected app client/consumer ID
    privateKey string
    The private key for JWT bearer flow authentication
    projectId number
    Project ID to create the Salesforce credential in
    username string
    The Salesforce username for OAuth JWT bearer flow authentication
    numThreads number
    The number of threads to use for dbt operations
    targetName string
    Target name
    client_id str
    The OAuth connected app client/consumer ID
    private_key str
    The private key for JWT bearer flow authentication
    project_id int
    Project ID to create the Salesforce credential in
    username str
    The Salesforce username for OAuth JWT bearer flow authentication
    num_threads int
    The number of threads to use for dbt operations
    target_name str
    Target name
    clientId String
    The OAuth connected app client/consumer ID
    privateKey String
    The private key for JWT bearer flow authentication
    projectId Number
    Project ID to create the Salesforce credential in
    username String
    The Salesforce username for OAuth JWT bearer flow authentication
    numThreads Number
    The number of threads to use for dbt operations
    targetName String
    Target name

    Outputs

    All input properties are implicitly available as output properties. Additionally, the SalesforceCredential resource produces the following output properties:

    CredentialId int
    The system Salesforce credential ID
    Id string
    The provider-assigned unique ID for this managed resource.
    CredentialId int
    The system Salesforce credential ID
    Id string
    The provider-assigned unique ID for this managed resource.
    credentialId Integer
    The system Salesforce credential ID
    id String
    The provider-assigned unique ID for this managed resource.
    credentialId number
    The system Salesforce credential ID
    id string
    The provider-assigned unique ID for this managed resource.
    credential_id int
    The system Salesforce credential ID
    id str
    The provider-assigned unique ID for this managed resource.
    credentialId Number
    The system Salesforce credential ID
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing SalesforceCredential Resource

    Get an existing SalesforceCredential resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: SalesforceCredentialState, opts?: CustomResourceOptions): SalesforceCredential
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            client_id: Optional[str] = None,
            credential_id: Optional[int] = None,
            num_threads: Optional[int] = None,
            private_key: Optional[str] = None,
            project_id: Optional[int] = None,
            target_name: Optional[str] = None,
            username: Optional[str] = None) -> SalesforceCredential
    func GetSalesforceCredential(ctx *Context, name string, id IDInput, state *SalesforceCredentialState, opts ...ResourceOption) (*SalesforceCredential, error)
    public static SalesforceCredential Get(string name, Input<string> id, SalesforceCredentialState? state, CustomResourceOptions? opts = null)
    public static SalesforceCredential get(String name, Output<String> id, SalesforceCredentialState state, CustomResourceOptions options)
    resources:  _:    type: dbtcloud:SalesforceCredential    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    ClientId string
    The OAuth connected app client/consumer ID
    CredentialId int
    The system Salesforce credential ID
    NumThreads int
    The number of threads to use for dbt operations
    PrivateKey string
    The private key for JWT bearer flow authentication
    ProjectId int
    Project ID to create the Salesforce credential in
    TargetName string
    Target name
    Username string
    The Salesforce username for OAuth JWT bearer flow authentication
    ClientId string
    The OAuth connected app client/consumer ID
    CredentialId int
    The system Salesforce credential ID
    NumThreads int
    The number of threads to use for dbt operations
    PrivateKey string
    The private key for JWT bearer flow authentication
    ProjectId int
    Project ID to create the Salesforce credential in
    TargetName string
    Target name
    Username string
    The Salesforce username for OAuth JWT bearer flow authentication
    clientId String
    The OAuth connected app client/consumer ID
    credentialId Integer
    The system Salesforce credential ID
    numThreads Integer
    The number of threads to use for dbt operations
    privateKey String
    The private key for JWT bearer flow authentication
    projectId Integer
    Project ID to create the Salesforce credential in
    targetName String
    Target name
    username String
    The Salesforce username for OAuth JWT bearer flow authentication
    clientId string
    The OAuth connected app client/consumer ID
    credentialId number
    The system Salesforce credential ID
    numThreads number
    The number of threads to use for dbt operations
    privateKey string
    The private key for JWT bearer flow authentication
    projectId number
    Project ID to create the Salesforce credential in
    targetName string
    Target name
    username string
    The Salesforce username for OAuth JWT bearer flow authentication
    client_id str
    The OAuth connected app client/consumer ID
    credential_id int
    The system Salesforce credential ID
    num_threads int
    The number of threads to use for dbt operations
    private_key str
    The private key for JWT bearer flow authentication
    project_id int
    Project ID to create the Salesforce credential in
    target_name str
    Target name
    username str
    The Salesforce username for OAuth JWT bearer flow authentication
    clientId String
    The OAuth connected app client/consumer ID
    credentialId Number
    The system Salesforce credential ID
    numThreads Number
    The number of threads to use for dbt operations
    privateKey String
    The private key for JWT bearer flow authentication
    projectId Number
    Project ID to create the Salesforce credential in
    targetName String
    Target name
    username String
    The Salesforce username for OAuth JWT bearer flow authentication

    Import

    using import blocks (requires Terraform >= 1.5) import { to = dbtcloud_salesforce_credential.my_salesforce_credential id = “project_id:credential_id” }

    import { to = dbtcloud_salesforce_credential.my_salesforce_credential id = “12345:6789” }

    using the older import command

    $ pulumi import dbtcloud:index/salesforceCredential:SalesforceCredential my_salesforce_credential "project_id:credential_id"
    $ pulumi import dbtcloud:index/salesforceCredential:SalesforceCredential my_salesforce_credential 12345:6789
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    dbtcloud pulumi/pulumi-dbtcloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the dbtcloud Terraform Provider.
    dbtcloud logo
    dbt Cloud v1.6.0 published on Friday, Feb 20, 2026 by Pulumi
      Meet Neo: Your AI Platform Teammate