published on Friday, May 8, 2026 by Pulumi
published on Friday, May 8, 2026 by Pulumi
Redshift credential resource
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as dbtcloud from "@pulumi/dbtcloud";
// Using the classic sensitive attribute (stored in state)
const redshift = new dbtcloud.RedshiftCredential("redshift", {
numThreads: 16,
projectId: testProject.id,
defaultSchema: "my_schema",
username: "my_username",
password: "my_sensitive_password",
isActive: true,
});
const config = new pulumi.Config();
const redshiftPassword = config.require("redshiftPassword");
const redshiftWo = new dbtcloud.RedshiftCredential("redshift_wo", {
numThreads: 16,
projectId: testProject.id,
defaultSchema: "my_schema",
username: "my_username",
passwordWo: redshiftPassword,
passwordWoVersion: 1,
isActive: true,
});
import pulumi
import pulumi_dbtcloud as dbtcloud
# Using the classic sensitive attribute (stored in state)
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)
config = pulumi.Config()
redshift_password = config.require("redshiftPassword")
redshift_wo = dbtcloud.RedshiftCredential("redshift_wo",
num_threads=16,
project_id=test_project["id"],
default_schema="my_schema",
username="my_username",
password_wo=redshift_password,
password_wo_version=1,
is_active=True)
package main
import (
"github.com/pulumi/pulumi-dbtcloud/sdk/go/dbtcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
// Using the classic sensitive attribute (stored in state)
_, 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
}
cfg := config.New(ctx, "")
redshiftPassword := cfg.Require("redshiftPassword")
_, err = dbtcloud.NewRedshiftCredential(ctx, "redshift_wo", &dbtcloud.RedshiftCredentialArgs{
NumThreads: pulumi.Int(16),
ProjectId: pulumi.Any(testProject.Id),
DefaultSchema: pulumi.String("my_schema"),
Username: pulumi.String("my_username"),
PasswordWo: pulumi.String(pulumi.String(redshiftPassword)),
PasswordWoVersion: pulumi.Int(1),
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(() =>
{
// Using the classic sensitive attribute (stored in state)
var redshift = new DbtCloud.Index.RedshiftCredential("redshift", new()
{
NumThreads = 16,
ProjectId = testProject.Id,
DefaultSchema = "my_schema",
Username = "my_username",
Password = "my_sensitive_password",
IsActive = true,
});
var config = new Config();
var redshiftPassword = config.Require("redshiftPassword");
var redshiftWo = new DbtCloud.Index.RedshiftCredential("redshift_wo", new()
{
NumThreads = 16,
ProjectId = testProject.Id,
DefaultSchema = "my_schema",
Username = "my_username",
PasswordWo = redshiftPassword,
PasswordWoVersion = 1,
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) {
final var config = ctx.config();
// Using the classic sensitive attribute (stored in state)
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());
final var redshiftPassword = config.require("redshiftPassword");
var redshiftWo = new RedshiftCredential("redshiftWo", RedshiftCredentialArgs.builder()
.numThreads(16)
.projectId(testProject.id())
.defaultSchema("my_schema")
.username("my_username")
.passwordWo(redshiftPassword)
.passwordWoVersion(1)
.isActive(true)
.build());
}
}
configuration:
# Using write-only attributes (not stored in state, requires Terraform >= 1.11)
# //
# // The password_wo value is never persisted in the Terraform state file.
# // Use password_wo_version to trigger an update when the password changes.
redshiftPassword:
type: string
resources:
# Using the classic sensitive attribute (stored in state)
redshift:
type: dbtcloud:RedshiftCredential
properties:
numThreads: 16
projectId: ${testProject.id}
defaultSchema: my_schema
username: my_username
password: my_sensitive_password
isActive: true
redshiftWo:
type: dbtcloud:RedshiftCredential
name: redshift_wo
properties:
numThreads: 16
projectId: ${testProject.id}
defaultSchema: my_schema
username: my_username
passwordWo: ${redshiftPassword}
passwordWoVersion: 1
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,
password_wo: Optional[str] = None,
password_wo_version: Optional[int] = 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",
PasswordWo = "string",
PasswordWoVersion = 0,
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"),
PasswordWo: pulumi.String("string"),
PasswordWoVersion: pulumi.Int(0),
Username: pulumi.String("string"),
})
var redshiftCredentialResource = new RedshiftCredential("redshiftCredentialResource", RedshiftCredentialArgs.builder()
.defaultSchema("string")
.numThreads(0)
.projectId(0)
.isActive(false)
.password("string")
.passwordWo("string")
.passwordWoVersion(0)
.username("string")
.build());
redshift_credential_resource = dbtcloud.RedshiftCredential("redshiftCredentialResource",
default_schema="string",
num_threads=0,
project_id=0,
is_active=False,
password="string",
password_wo="string",
password_wo_version=0,
username="string")
const redshiftCredentialResource = new dbtcloud.RedshiftCredential("redshiftCredentialResource", {
defaultSchema: "string",
numThreads: 0,
projectId: 0,
isActive: false,
password: "string",
passwordWo: "string",
passwordWoVersion: 0,
username: "string",
});
type: dbtcloud:RedshiftCredential
properties:
defaultSchema: string
isActive: false
numThreads: 0
password: string
passwordWo: string
passwordWoVersion: 0
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:
- Default
Schema string - 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 string
- The password for the Redshift account. Consider using
passwordWoinstead, which is not stored in state. - Password
Wo string - NOTE: This field is write-only and its value will not be updated in state as part of read operations.
Write-only alternative to
password. The value is not stored in state. RequirespasswordWoVersionto trigger updates. - Password
Wo intVersion - Version number for
passwordWo. Increment this value to trigger an update of the password when usingpasswordWo. - Username string
- The username for the Redshift account.
- Default
Schema string - 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 string
- The password for the Redshift account. Consider using
passwordWoinstead, which is not stored in state. - Password
Wo string - NOTE: This field is write-only and its value will not be updated in state as part of read operations.
Write-only alternative to
password. The value is not stored in state. RequirespasswordWoVersionto trigger updates. - Password
Wo intVersion - Version number for
passwordWo. Increment this value to trigger an update of the password when usingpasswordWo. - Username string
- The username for the Redshift account.
- default
Schema String - Default schema name
- num
Threads Integer - Number of threads to use
- project
Id Integer - Project ID to create the Redshift credential in
- is
Active Boolean - Whether the Redshift credential is active
- password String
- The password for the Redshift account. Consider using
passwordWoinstead, which is not stored in state. - password
Wo String - NOTE: This field is write-only and its value will not be updated in state as part of read operations.
Write-only alternative to
password. The value is not stored in state. RequirespasswordWoVersionto trigger updates. - password
Wo IntegerVersion - Version number for
passwordWo. Increment this value to trigger an update of the password when usingpasswordWo. - username String
- The username for the Redshift account.
- default
Schema string - Default schema name
- num
Threads number - Number of threads to use
- project
Id number - Project ID to create the Redshift credential in
- is
Active boolean - Whether the Redshift credential is active
- password string
- The password for the Redshift account. Consider using
passwordWoinstead, which is not stored in state. - password
Wo string - NOTE: This field is write-only and its value will not be updated in state as part of read operations.
Write-only alternative to
password. The value is not stored in state. RequirespasswordWoVersionto trigger updates. - password
Wo numberVersion - Version number for
passwordWo. Increment this value to trigger an update of the password when usingpasswordWo. - 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. Consider using
passwordWoinstead, which is not stored in state. - password_
wo str - NOTE: This field is write-only and its value will not be updated in state as part of read operations.
Write-only alternative to
password. The value is not stored in state. RequirespasswordWoVersionto trigger updates. - password_
wo_ intversion - Version number for
passwordWo. Increment this value to trigger an update of the password when usingpasswordWo. - username str
- The username for the Redshift account.
- default
Schema String - Default schema name
- num
Threads Number - Number of threads to use
- project
Id Number - Project ID to create the Redshift credential in
- is
Active Boolean - Whether the Redshift credential is active
- password String
- The password for the Redshift account. Consider using
passwordWoinstead, which is not stored in state. - password
Wo String - NOTE: This field is write-only and its value will not be updated in state as part of read operations.
Write-only alternative to
password. The value is not stored in state. RequirespasswordWoVersionto trigger updates. - password
Wo NumberVersion - Version number for
passwordWo. Increment this value to trigger an update of the password when usingpasswordWo. - 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:
- Credential
Id int - The internal credential ID
- Id string
- The provider-assigned unique ID for this managed resource.
- Credential
Id int - The internal credential ID
- Id string
- The provider-assigned unique ID for this managed resource.
- credential
Id Integer - The internal credential ID
- id String
- The provider-assigned unique ID for this managed resource.
- credential
Id 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.
- credential
Id 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,
password_wo: Optional[str] = None,
password_wo_version: Optional[int] = None,
project_id: Optional[int] = None,
username: Optional[str] = None) -> RedshiftCredentialfunc 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.
- Credential
Id int - The internal credential ID
- Default
Schema string - Default schema name
- Is
Active bool - Whether the Redshift credential is active
- Num
Threads int - Number of threads to use
- Password string
- The password for the Redshift account. Consider using
passwordWoinstead, which is not stored in state. - Password
Wo string - NOTE: This field is write-only and its value will not be updated in state as part of read operations.
Write-only alternative to
password. The value is not stored in state. RequirespasswordWoVersionto trigger updates. - Password
Wo intVersion - Version number for
passwordWo. Increment this value to trigger an update of the password when usingpasswordWo. - Project
Id int - 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 string - Default schema name
- Is
Active bool - Whether the Redshift credential is active
- Num
Threads int - Number of threads to use
- Password string
- The password for the Redshift account. Consider using
passwordWoinstead, which is not stored in state. - Password
Wo string - NOTE: This field is write-only and its value will not be updated in state as part of read operations.
Write-only alternative to
password. The value is not stored in state. RequirespasswordWoVersionto trigger updates. - Password
Wo intVersion - Version number for
passwordWo. Increment this value to trigger an update of the password when usingpasswordWo. - Project
Id int - Project ID to create the Redshift credential in
- Username string
- The username for the Redshift account.
- credential
Id Integer - The internal credential ID
- default
Schema String - Default schema name
- is
Active Boolean - Whether the Redshift credential is active
- num
Threads Integer - Number of threads to use
- password String
- The password for the Redshift account. Consider using
passwordWoinstead, which is not stored in state. - password
Wo String - NOTE: This field is write-only and its value will not be updated in state as part of read operations.
Write-only alternative to
password. The value is not stored in state. RequirespasswordWoVersionto trigger updates. - password
Wo IntegerVersion - Version number for
passwordWo. Increment this value to trigger an update of the password when usingpasswordWo. - project
Id Integer - Project ID to create the Redshift credential in
- username String
- The username for the Redshift account.
- credential
Id number - The internal credential ID
- default
Schema string - Default schema name
- is
Active boolean - Whether the Redshift credential is active
- num
Threads number - Number of threads to use
- password string
- The password for the Redshift account. Consider using
passwordWoinstead, which is not stored in state. - password
Wo string - NOTE: This field is write-only and its value will not be updated in state as part of read operations.
Write-only alternative to
password. The value is not stored in state. RequirespasswordWoVersionto trigger updates. - password
Wo numberVersion - Version number for
passwordWo. Increment this value to trigger an update of the password when usingpasswordWo. - project
Id 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. Consider using
passwordWoinstead, which is not stored in state. - password_
wo str - NOTE: This field is write-only and its value will not be updated in state as part of read operations.
Write-only alternative to
password. The value is not stored in state. RequirespasswordWoVersionto trigger updates. - password_
wo_ intversion - Version number for
passwordWo. Increment this value to trigger an update of the password when usingpasswordWo. - project_
id int - Project ID to create the Redshift credential in
- username str
- The username for the Redshift account.
- credential
Id Number - The internal credential ID
- default
Schema String - Default schema name
- is
Active Boolean - Whether the Redshift credential is active
- num
Threads Number - Number of threads to use
- password String
- The password for the Redshift account. Consider using
passwordWoinstead, which is not stored in state. - password
Wo String - NOTE: This field is write-only and its value will not be updated in state as part of read operations.
Write-only alternative to
password. The value is not stored in state. RequirespasswordWoVersionto trigger updates. - password
Wo NumberVersion - Version number for
passwordWo. Increment this value to trigger an update of the password when usingpasswordWo. - project
Id 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
dbtcloudTerraform Provider.
published on Friday, May 8, 2026 by Pulumi
