1. Packages
  2. dbt Cloud Provider
  3. API Docs
  4. SnowflakeCredential
dbt Cloud v0.1.30 published on Thursday, Mar 20, 2025 by Pulumi

dbtcloud.SnowflakeCredential

Explore with Pulumi AI

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as dbtcloud from "@pulumi/dbtcloud";

const prodCredential = new dbtcloud.SnowflakeCredential("prod_credential", {
    projectId: dbtProject.id,
    authType: "password",
    numThreads: 16,
    schema: "SCHEMA",
    user: "user",
    password: "password",
});
Copy
import pulumi
import pulumi_dbtcloud as dbtcloud

prod_credential = dbtcloud.SnowflakeCredential("prod_credential",
    project_id=dbt_project["id"],
    auth_type="password",
    num_threads=16,
    schema="SCHEMA",
    user="user",
    password="password")
Copy
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 {
		_, err := dbtcloud.NewSnowflakeCredential(ctx, "prod_credential", &dbtcloud.SnowflakeCredentialArgs{
			ProjectId:  pulumi.Any(dbtProject.Id),
			AuthType:   pulumi.String("password"),
			NumThreads: pulumi.Int(16),
			Schema:     pulumi.String("SCHEMA"),
			User:       pulumi.String("user"),
			Password:   pulumi.String("password"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using DbtCloud = Pulumi.DbtCloud;

return await Deployment.RunAsync(() => 
{
    var prodCredential = new DbtCloud.SnowflakeCredential("prod_credential", new()
    {
        ProjectId = dbtProject.Id,
        AuthType = "password",
        NumThreads = 16,
        Schema = "SCHEMA",
        User = "user",
        Password = "password",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.dbtcloud.SnowflakeCredential;
import com.pulumi.dbtcloud.SnowflakeCredentialArgs;
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) {
        var prodCredential = new SnowflakeCredential("prodCredential", SnowflakeCredentialArgs.builder()
            .projectId(dbtProject.id())
            .authType("password")
            .numThreads(16)
            .schema("SCHEMA")
            .user("user")
            .password("password")
            .build());

    }
}
Copy
resources:
  prodCredential:
    type: dbtcloud:SnowflakeCredential
    name: prod_credential
    properties:
      projectId: ${dbtProject.id}
      authType: password
      numThreads: 16
      schema: SCHEMA
      user: user
      password: password
Copy

Create SnowflakeCredential Resource

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

Constructor syntax

new SnowflakeCredential(name: string, args: SnowflakeCredentialArgs, opts?: CustomResourceOptions);
@overload
def SnowflakeCredential(resource_name: str,
                        args: SnowflakeCredentialArgs,
                        opts: Optional[ResourceOptions] = None)

@overload
def SnowflakeCredential(resource_name: str,
                        opts: Optional[ResourceOptions] = None,
                        auth_type: Optional[str] = None,
                        num_threads: Optional[int] = None,
                        project_id: Optional[int] = None,
                        schema: Optional[str] = None,
                        user: Optional[str] = None,
                        database: Optional[str] = None,
                        is_active: Optional[bool] = None,
                        password: Optional[str] = None,
                        private_key: Optional[str] = None,
                        private_key_passphrase: Optional[str] = None,
                        role: Optional[str] = None,
                        warehouse: Optional[str] = None)
func NewSnowflakeCredential(ctx *Context, name string, args SnowflakeCredentialArgs, opts ...ResourceOption) (*SnowflakeCredential, error)
public SnowflakeCredential(string name, SnowflakeCredentialArgs args, CustomResourceOptions? opts = null)
public SnowflakeCredential(String name, SnowflakeCredentialArgs args)
public SnowflakeCredential(String name, SnowflakeCredentialArgs args, CustomResourceOptions options)
type: dbtcloud:SnowflakeCredential
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. SnowflakeCredentialArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. SnowflakeCredentialArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. SnowflakeCredentialArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. SnowflakeCredentialArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. SnowflakeCredentialArgs
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 snowflakeCredentialResource = new DbtCloud.SnowflakeCredential("snowflakeCredentialResource", new()
{
    AuthType = "string",
    NumThreads = 0,
    ProjectId = 0,
    Schema = "string",
    User = "string",
    Database = "string",
    IsActive = false,
    Password = "string",
    PrivateKey = "string",
    PrivateKeyPassphrase = "string",
    Role = "string",
    Warehouse = "string",
});
Copy
example, err := dbtcloud.NewSnowflakeCredential(ctx, "snowflakeCredentialResource", &dbtcloud.SnowflakeCredentialArgs{
	AuthType:             pulumi.String("string"),
	NumThreads:           pulumi.Int(0),
	ProjectId:            pulumi.Int(0),
	Schema:               pulumi.String("string"),
	User:                 pulumi.String("string"),
	Database:             pulumi.String("string"),
	IsActive:             pulumi.Bool(false),
	Password:             pulumi.String("string"),
	PrivateKey:           pulumi.String("string"),
	PrivateKeyPassphrase: pulumi.String("string"),
	Role:                 pulumi.String("string"),
	Warehouse:            pulumi.String("string"),
})
Copy
var snowflakeCredentialResource = new SnowflakeCredential("snowflakeCredentialResource", SnowflakeCredentialArgs.builder()
    .authType("string")
    .numThreads(0)
    .projectId(0)
    .schema("string")
    .user("string")
    .database("string")
    .isActive(false)
    .password("string")
    .privateKey("string")
    .privateKeyPassphrase("string")
    .role("string")
    .warehouse("string")
    .build());
Copy
snowflake_credential_resource = dbtcloud.SnowflakeCredential("snowflakeCredentialResource",
    auth_type="string",
    num_threads=0,
    project_id=0,
    schema="string",
    user="string",
    database="string",
    is_active=False,
    password="string",
    private_key="string",
    private_key_passphrase="string",
    role="string",
    warehouse="string")
Copy
const snowflakeCredentialResource = new dbtcloud.SnowflakeCredential("snowflakeCredentialResource", {
    authType: "string",
    numThreads: 0,
    projectId: 0,
    schema: "string",
    user: "string",
    database: "string",
    isActive: false,
    password: "string",
    privateKey: "string",
    privateKeyPassphrase: "string",
    role: "string",
    warehouse: "string",
});
Copy
type: dbtcloud:SnowflakeCredential
properties:
    authType: string
    database: string
    isActive: false
    numThreads: 0
    password: string
    privateKey: string
    privateKeyPassphrase: string
    projectId: 0
    role: string
    schema: string
    user: string
    warehouse: string
Copy

SnowflakeCredential 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 SnowflakeCredential resource accepts the following input properties:

AuthType This property is required. string
The type of Snowflake credential ('password' or 'keypair')
NumThreads This property is required. int
Number of threads to use
ProjectId
This property is required.
Changes to this property will trigger replacement.
int
Project ID to create the Snowflake credential in
Schema This property is required. string
Default schema name
User This property is required. string
Username for Snowflake
Database string
Database to connect to
IsActive bool
Whether the Snowflake credential is active
Password string
Password for Snowflake
PrivateKey string
Private key for Snowflake
PrivateKeyPassphrase string
Private key passphrase for Snowflake
Role string
Role to assume
Warehouse string
Warehouse to use
AuthType This property is required. string
The type of Snowflake credential ('password' or 'keypair')
NumThreads This property is required. int
Number of threads to use
ProjectId
This property is required.
Changes to this property will trigger replacement.
int
Project ID to create the Snowflake credential in
Schema This property is required. string
Default schema name
User This property is required. string
Username for Snowflake
Database string
Database to connect to
IsActive bool
Whether the Snowflake credential is active
Password string
Password for Snowflake
PrivateKey string
Private key for Snowflake
PrivateKeyPassphrase string
Private key passphrase for Snowflake
Role string
Role to assume
Warehouse string
Warehouse to use
authType This property is required. String
The type of Snowflake credential ('password' or 'keypair')
numThreads This property is required. Integer
Number of threads to use
projectId
This property is required.
Changes to this property will trigger replacement.
Integer
Project ID to create the Snowflake credential in
schema This property is required. String
Default schema name
user This property is required. String
Username for Snowflake
database String
Database to connect to
isActive Boolean
Whether the Snowflake credential is active
password String
Password for Snowflake
privateKey String
Private key for Snowflake
privateKeyPassphrase String
Private key passphrase for Snowflake
role String
Role to assume
warehouse String
Warehouse to use
authType This property is required. string
The type of Snowflake credential ('password' or 'keypair')
numThreads This property is required. number
Number of threads to use
projectId
This property is required.
Changes to this property will trigger replacement.
number
Project ID to create the Snowflake credential in
schema This property is required. string
Default schema name
user This property is required. string
Username for Snowflake
database string
Database to connect to
isActive boolean
Whether the Snowflake credential is active
password string
Password for Snowflake
privateKey string
Private key for Snowflake
privateKeyPassphrase string
Private key passphrase for Snowflake
role string
Role to assume
warehouse string
Warehouse to use
auth_type This property is required. str
The type of Snowflake credential ('password' or 'keypair')
num_threads This property is required. int
Number of threads to use
project_id
This property is required.
Changes to this property will trigger replacement.
int
Project ID to create the Snowflake credential in
schema This property is required. str
Default schema name
user This property is required. str
Username for Snowflake
database str
Database to connect to
is_active bool
Whether the Snowflake credential is active
password str
Password for Snowflake
private_key str
Private key for Snowflake
private_key_passphrase str
Private key passphrase for Snowflake
role str
Role to assume
warehouse str
Warehouse to use
authType This property is required. String
The type of Snowflake credential ('password' or 'keypair')
numThreads This property is required. Number
Number of threads to use
projectId
This property is required.
Changes to this property will trigger replacement.
Number
Project ID to create the Snowflake credential in
schema This property is required. String
Default schema name
user This property is required. String
Username for Snowflake
database String
Database to connect to
isActive Boolean
Whether the Snowflake credential is active
password String
Password for Snowflake
privateKey String
Private key for Snowflake
privateKeyPassphrase String
Private key passphrase for Snowflake
role String
Role to assume
warehouse String
Warehouse to use

Outputs

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

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

Look up Existing SnowflakeCredential Resource

Get an existing SnowflakeCredential 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?: SnowflakeCredentialState, opts?: CustomResourceOptions): SnowflakeCredential
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        auth_type: Optional[str] = None,
        credential_id: Optional[int] = None,
        database: Optional[str] = None,
        is_active: Optional[bool] = None,
        num_threads: Optional[int] = None,
        password: Optional[str] = None,
        private_key: Optional[str] = None,
        private_key_passphrase: Optional[str] = None,
        project_id: Optional[int] = None,
        role: Optional[str] = None,
        schema: Optional[str] = None,
        user: Optional[str] = None,
        warehouse: Optional[str] = None) -> SnowflakeCredential
func GetSnowflakeCredential(ctx *Context, name string, id IDInput, state *SnowflakeCredentialState, opts ...ResourceOption) (*SnowflakeCredential, error)
public static SnowflakeCredential Get(string name, Input<string> id, SnowflakeCredentialState? state, CustomResourceOptions? opts = null)
public static SnowflakeCredential get(String name, Output<String> id, SnowflakeCredentialState state, CustomResourceOptions options)
resources:  _:    type: dbtcloud:SnowflakeCredential    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
AuthType string
The type of Snowflake credential ('password' or 'keypair')
CredentialId int
The system Snowflake credential ID
Database string
Database to connect to
IsActive bool
Whether the Snowflake credential is active
NumThreads int
Number of threads to use
Password string
Password for Snowflake
PrivateKey string
Private key for Snowflake
PrivateKeyPassphrase string
Private key passphrase for Snowflake
ProjectId Changes to this property will trigger replacement. int
Project ID to create the Snowflake credential in
Role string
Role to assume
Schema string
Default schema name
User string
Username for Snowflake
Warehouse string
Warehouse to use
AuthType string
The type of Snowflake credential ('password' or 'keypair')
CredentialId int
The system Snowflake credential ID
Database string
Database to connect to
IsActive bool
Whether the Snowflake credential is active
NumThreads int
Number of threads to use
Password string
Password for Snowflake
PrivateKey string
Private key for Snowflake
PrivateKeyPassphrase string
Private key passphrase for Snowflake
ProjectId Changes to this property will trigger replacement. int
Project ID to create the Snowflake credential in
Role string
Role to assume
Schema string
Default schema name
User string
Username for Snowflake
Warehouse string
Warehouse to use
authType String
The type of Snowflake credential ('password' or 'keypair')
credentialId Integer
The system Snowflake credential ID
database String
Database to connect to
isActive Boolean
Whether the Snowflake credential is active
numThreads Integer
Number of threads to use
password String
Password for Snowflake
privateKey String
Private key for Snowflake
privateKeyPassphrase String
Private key passphrase for Snowflake
projectId Changes to this property will trigger replacement. Integer
Project ID to create the Snowflake credential in
role String
Role to assume
schema String
Default schema name
user String
Username for Snowflake
warehouse String
Warehouse to use
authType string
The type of Snowflake credential ('password' or 'keypair')
credentialId number
The system Snowflake credential ID
database string
Database to connect to
isActive boolean
Whether the Snowflake credential is active
numThreads number
Number of threads to use
password string
Password for Snowflake
privateKey string
Private key for Snowflake
privateKeyPassphrase string
Private key passphrase for Snowflake
projectId Changes to this property will trigger replacement. number
Project ID to create the Snowflake credential in
role string
Role to assume
schema string
Default schema name
user string
Username for Snowflake
warehouse string
Warehouse to use
auth_type str
The type of Snowflake credential ('password' or 'keypair')
credential_id int
The system Snowflake credential ID
database str
Database to connect to
is_active bool
Whether the Snowflake credential is active
num_threads int
Number of threads to use
password str
Password for Snowflake
private_key str
Private key for Snowflake
private_key_passphrase str
Private key passphrase for Snowflake
project_id Changes to this property will trigger replacement. int
Project ID to create the Snowflake credential in
role str
Role to assume
schema str
Default schema name
user str
Username for Snowflake
warehouse str
Warehouse to use
authType String
The type of Snowflake credential ('password' or 'keypair')
credentialId Number
The system Snowflake credential ID
database String
Database to connect to
isActive Boolean
Whether the Snowflake credential is active
numThreads Number
Number of threads to use
password String
Password for Snowflake
privateKey String
Private key for Snowflake
privateKeyPassphrase String
Private key passphrase for Snowflake
projectId Changes to this property will trigger replacement. Number
Project ID to create the Snowflake credential in
role String
Role to assume
schema String
Default schema name
user String
Username for Snowflake
warehouse String
Warehouse to use

Import

using import blocks (requires Terraform >= 1.5)

import {

to = dbtcloud_snowflake_credential.prod_snowflake_credential

id = “project_id:credential_id”

}

import {

to = dbtcloud_snowflake_credential.prod_snowflake_credential

id = “12345:6789”

}

using the older import command

$ pulumi import dbtcloud:index/snowflakeCredential:SnowflakeCredential prod_snowflake_credential "project_id:credential_id"
Copy
$ pulumi import dbtcloud:index/snowflakeCredential:SnowflakeCredential prod_snowflake_credential 12345:6789
Copy

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.