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:
- Client
Id string - The OAuth connected app client/consumer ID
- Private
Key string - The private key for JWT bearer flow authentication
- Project
Id int - Project ID to create the Salesforce credential in
- Username string
- The Salesforce username for OAuth JWT bearer flow authentication
- Num
Threads int - The number of threads to use for dbt operations
- Target
Name string - Target name
- Client
Id string - The OAuth connected app client/consumer ID
- Private
Key string - The private key for JWT bearer flow authentication
- Project
Id int - Project ID to create the Salesforce credential in
- Username string
- The Salesforce username for OAuth JWT bearer flow authentication
- Num
Threads int - The number of threads to use for dbt operations
- Target
Name string - Target name
- client
Id String - The OAuth connected app client/consumer ID
- private
Key String - The private key for JWT bearer flow authentication
- project
Id Integer - Project ID to create the Salesforce credential in
- username String
- The Salesforce username for OAuth JWT bearer flow authentication
- num
Threads Integer - The number of threads to use for dbt operations
- target
Name String - Target name
- client
Id string - The OAuth connected app client/consumer ID
- private
Key string - The private key for JWT bearer flow authentication
- project
Id number - Project ID to create the Salesforce credential in
- username string
- The Salesforce username for OAuth JWT bearer flow authentication
- num
Threads number - The number of threads to use for dbt operations
- target
Name 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
- client
Id String - The OAuth connected app client/consumer ID
- private
Key String - The private key for JWT bearer flow authentication
- project
Id Number - Project ID to create the Salesforce credential in
- username String
- The Salesforce username for OAuth JWT bearer flow authentication
- num
Threads Number - The number of threads to use for dbt operations
- target
Name String - Target name
Outputs
All input properties are implicitly available as output properties. Additionally, the SalesforceCredential resource produces the following output properties:
- Credential
Id int - 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 string
- The provider-assigned unique ID for this managed resource.
- credential
Id Integer - The system Salesforce credential ID
- id String
- The provider-assigned unique ID for this managed resource.
- credential
Id 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.
- credential
Id 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) -> SalesforceCredentialfunc 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.
- Client
Id string - 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 string - The private key for JWT bearer flow authentication
- Project
Id int - Project ID to create the Salesforce credential in
- Target
Name string - Target name
- Username string
- The Salesforce username for OAuth JWT bearer flow authentication
- Client
Id string - 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 string - The private key for JWT bearer flow authentication
- Project
Id int - Project ID to create the Salesforce credential in
- Target
Name string - Target name
- Username string
- The Salesforce username for OAuth JWT bearer flow authentication
- client
Id String - The OAuth connected app client/consumer ID
- credential
Id Integer - The system Salesforce credential ID
- num
Threads Integer - The number of threads to use for dbt operations
- private
Key String - The private key for JWT bearer flow authentication
- project
Id Integer - Project ID to create the Salesforce credential in
- target
Name String - Target name
- username String
- The Salesforce username for OAuth JWT bearer flow authentication
- client
Id string - The OAuth connected app client/consumer ID
- credential
Id number - The system Salesforce credential ID
- num
Threads number - The number of threads to use for dbt operations
- private
Key string - The private key for JWT bearer flow authentication
- project
Id number - Project ID to create the Salesforce credential in
- target
Name 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
- client
Id String - The OAuth connected app client/consumer ID
- credential
Id Number - The system Salesforce credential ID
- num
Threads Number - The number of threads to use for dbt operations
- private
Key String - The private key for JWT bearer flow authentication
- project
Id Number - Project ID to create the Salesforce credential in
- target
Name 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
dbtcloudTerraform Provider.
