1. Packages
  2. dbt Cloud Provider
  3. API Docs
  4. RedshiftCredential
dbt Cloud v1.0.0 published on Wednesday, Jun 11, 2025 by Pulumi

dbtcloud.RedshiftCredential

Explore with Pulumi AI

dbtcloud logo
dbt Cloud v1.0.0 published on Wednesday, Jun 11, 2025 by Pulumi

    Redshift credential resource

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as dbtcloud from "@pulumi/dbtcloud";
    
    const redshift = new dbtcloud.RedshiftCredential("redshift", {
        numThreads: 16,
        projectId: testProject.id,
        defaultSchema: "my_schema",
        username: "my_username",
        password: "my_sensitive_password",
        isActive: true,
    });
    
    import pulumi
    import pulumi_dbtcloud as dbtcloud
    
    redshift = dbtcloud.RedshiftCredential("redshift",
        num_threads=16,
        project_id=test_project["id"],
        default_schema="my_schema",
        username="my_username",
        password="my_sensitive_password",
        is_active=True)
    
    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.NewRedshiftCredential(ctx, "redshift", &dbtcloud.RedshiftCredentialArgs{
    			NumThreads:    pulumi.Int(16),
    			ProjectId:     pulumi.Any(testProject.Id),
    			DefaultSchema: pulumi.String("my_schema"),
    			Username:      pulumi.String("my_username"),
    			Password:      pulumi.String("my_sensitive_password"),
    			IsActive:      pulumi.Bool(true),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using DbtCloud = Pulumi.DbtCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var redshift = new DbtCloud.RedshiftCredential("redshift", new()
        {
            NumThreads = 16,
            ProjectId = testProject.Id,
            DefaultSchema = "my_schema",
            Username = "my_username",
            Password = "my_sensitive_password",
            IsActive = true,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.dbtcloud.RedshiftCredential;
    import com.pulumi.dbtcloud.RedshiftCredentialArgs;
    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 redshift = new RedshiftCredential("redshift", RedshiftCredentialArgs.builder()
                .numThreads(16)
                .projectId(testProject.id())
                .defaultSchema("my_schema")
                .username("my_username")
                .password("my_sensitive_password")
                .isActive(true)
                .build());
    
        }
    }
    
    resources:
      redshift:
        type: dbtcloud:RedshiftCredential
        properties:
          numThreads: 16
          projectId: ${testProject.id}
          defaultSchema: my_schema
          username: my_username
          password: my_sensitive_password
          isActive: true
    

    Create RedshiftCredential Resource

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

    Constructor syntax

    new RedshiftCredential(name: string, args: RedshiftCredentialArgs, opts?: CustomResourceOptions);
    @overload
    def RedshiftCredential(resource_name: str,
                           args: RedshiftCredentialArgs,
                           opts: Optional[ResourceOptions] = None)
    
    @overload
    def RedshiftCredential(resource_name: str,
                           opts: Optional[ResourceOptions] = None,
                           default_schema: Optional[str] = None,
                           num_threads: Optional[int] = None,
                           project_id: Optional[int] = None,
                           is_active: Optional[bool] = None,
                           password: Optional[str] = None,
                           username: Optional[str] = None)
    func NewRedshiftCredential(ctx *Context, name string, args RedshiftCredentialArgs, opts ...ResourceOption) (*RedshiftCredential, error)
    public RedshiftCredential(string name, RedshiftCredentialArgs args, CustomResourceOptions? opts = null)
    public RedshiftCredential(String name, RedshiftCredentialArgs args)
    public RedshiftCredential(String name, RedshiftCredentialArgs args, CustomResourceOptions options)
    
    type: dbtcloud:RedshiftCredential
    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 RedshiftCredentialArgs
    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 RedshiftCredentialArgs
    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 RedshiftCredentialArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args RedshiftCredentialArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args RedshiftCredentialArgs
    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 redshiftCredentialResource = new DbtCloud.RedshiftCredential("redshiftCredentialResource", new()
    {
        DefaultSchema = "string",
        NumThreads = 0,
        ProjectId = 0,
        IsActive = false,
        Password = "string",
        Username = "string",
    });
    
    example, err := dbtcloud.NewRedshiftCredential(ctx, "redshiftCredentialResource", &dbtcloud.RedshiftCredentialArgs{
    	DefaultSchema: pulumi.String("string"),
    	NumThreads:    pulumi.Int(0),
    	ProjectId:     pulumi.Int(0),
    	IsActive:      pulumi.Bool(false),
    	Password:      pulumi.String("string"),
    	Username:      pulumi.String("string"),
    })
    
    var redshiftCredentialResource = new RedshiftCredential("redshiftCredentialResource", RedshiftCredentialArgs.builder()
        .defaultSchema("string")
        .numThreads(0)
        .projectId(0)
        .isActive(false)
        .password("string")
        .username("string")
        .build());
    
    redshift_credential_resource = dbtcloud.RedshiftCredential("redshiftCredentialResource",
        default_schema="string",
        num_threads=0,
        project_id=0,
        is_active=False,
        password="string",
        username="string")
    
    const redshiftCredentialResource = new dbtcloud.RedshiftCredential("redshiftCredentialResource", {
        defaultSchema: "string",
        numThreads: 0,
        projectId: 0,
        isActive: false,
        password: "string",
        username: "string",
    });
    
    type: dbtcloud:RedshiftCredential
    properties:
        defaultSchema: string
        isActive: false
        numThreads: 0
        password: string
        projectId: 0
        username: string
    

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

    DefaultSchema string
    Default schema name
    NumThreads int
    Number of threads to use
    ProjectId int
    Project ID to create the Redshift credential in
    IsActive bool
    Whether the Redshift credential is active
    Password string
    The password for the Redshift account
    Username string
    The username for the Redshift account.
    DefaultSchema string
    Default schema name
    NumThreads int
    Number of threads to use
    ProjectId int
    Project ID to create the Redshift credential in
    IsActive bool
    Whether the Redshift credential is active
    Password string
    The password for the Redshift account
    Username string
    The username for the Redshift account.
    defaultSchema String
    Default schema name
    numThreads Integer
    Number of threads to use
    projectId Integer
    Project ID to create the Redshift credential in
    isActive Boolean
    Whether the Redshift credential is active
    password String
    The password for the Redshift account
    username String
    The username for the Redshift account.
    defaultSchema string
    Default schema name
    numThreads number
    Number of threads to use
    projectId number
    Project ID to create the Redshift credential in
    isActive boolean
    Whether the Redshift credential is active
    password string
    The password for the Redshift account
    username string
    The username for the Redshift account.
    default_schema str
    Default schema name
    num_threads int
    Number of threads to use
    project_id int
    Project ID to create the Redshift credential in
    is_active bool
    Whether the Redshift credential is active
    password str
    The password for the Redshift account
    username str
    The username for the Redshift account.
    defaultSchema String
    Default schema name
    numThreads Number
    Number of threads to use
    projectId Number
    Project ID to create the Redshift credential in
    isActive Boolean
    Whether the Redshift credential is active
    password String
    The password for the Redshift account
    username String
    The username for the Redshift account.

    Outputs

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

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

    Look up Existing RedshiftCredential Resource

    Get an existing RedshiftCredential 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?: RedshiftCredentialState, opts?: CustomResourceOptions): RedshiftCredential
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            credential_id: Optional[int] = None,
            default_schema: Optional[str] = None,
            is_active: Optional[bool] = None,
            num_threads: Optional[int] = None,
            password: Optional[str] = None,
            project_id: Optional[int] = None,
            username: Optional[str] = None) -> RedshiftCredential
    func GetRedshiftCredential(ctx *Context, name string, id IDInput, state *RedshiftCredentialState, opts ...ResourceOption) (*RedshiftCredential, error)
    public static RedshiftCredential Get(string name, Input<string> id, RedshiftCredentialState? state, CustomResourceOptions? opts = null)
    public static RedshiftCredential get(String name, Output<String> id, RedshiftCredentialState state, CustomResourceOptions options)
    resources:  _:    type: dbtcloud:RedshiftCredential    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:
    CredentialId int
    The internal credential ID
    DefaultSchema string
    Default schema name
    IsActive bool
    Whether the Redshift credential is active
    NumThreads int
    Number of threads to use
    Password string
    The password for the Redshift account
    ProjectId int
    Project ID to create the Redshift credential in
    Username string
    The username for the Redshift account.
    CredentialId int
    The internal credential ID
    DefaultSchema string
    Default schema name
    IsActive bool
    Whether the Redshift credential is active
    NumThreads int
    Number of threads to use
    Password string
    The password for the Redshift account
    ProjectId int
    Project ID to create the Redshift credential in
    Username string
    The username for the Redshift account.
    credentialId Integer
    The internal credential ID
    defaultSchema String
    Default schema name
    isActive Boolean
    Whether the Redshift credential is active
    numThreads Integer
    Number of threads to use
    password String
    The password for the Redshift account
    projectId Integer
    Project ID to create the Redshift credential in
    username String
    The username for the Redshift account.
    credentialId number
    The internal credential ID
    defaultSchema string
    Default schema name
    isActive boolean
    Whether the Redshift credential is active
    numThreads number
    Number of threads to use
    password string
    The password for the Redshift account
    projectId number
    Project ID to create the Redshift credential in
    username string
    The username for the Redshift account.
    credential_id int
    The internal credential ID
    default_schema str
    Default schema name
    is_active bool
    Whether the Redshift credential is active
    num_threads int
    Number of threads to use
    password str
    The password for the Redshift account
    project_id int
    Project ID to create the Redshift credential in
    username str
    The username for the Redshift account.
    credentialId Number
    The internal credential ID
    defaultSchema String
    Default schema name
    isActive Boolean
    Whether the Redshift credential is active
    numThreads Number
    Number of threads to use
    password String
    The password for the Redshift account
    projectId Number
    Project ID to create the Redshift credential in
    username String
    The username for the Redshift account.

    Import

    using import blocks (requires Terraform >= 1.5)

    import {

    to = dbtcloud_redshift_credential.my_credential

    id = “project_id:credential_id”

    }

    import {

    to = dbtcloud_redshift_credential.my_credential

    id = “12345:6789”

    }

    using the older import command

    $ pulumi import dbtcloud:index/redshiftCredential:RedshiftCredential my_credential "project_id:credential_id"
    
    $ pulumi import dbtcloud:index/redshiftCredential:RedshiftCredential my_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.0.0 published on Wednesday, Jun 11, 2025 by Pulumi