published on Saturday, Oct 17, 2026 by Pulumi
dbt Cloudpublished on Saturday, Oct 17, 2026 by Pulumi
ClickHouse 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 myClickhouseCred = new dbtcloud.ClickhouseCredential("my_clickhouse_cred", {
projectId: dbtProject.id,
schema: "my_schema",
user: "my_user",
password: "my_password",
targetName: "default",
threads: 4,
});
const config = new pulumi.Config();
const clickhousePassword = config.require("clickhousePassword");
const myClickhouseCredWo = new dbtcloud.ClickhouseCredential("my_clickhouse_cred_wo", {
projectId: dbtProject.id,
schema: "my_schema",
user: "my_user",
passwordWo: clickhousePassword,
passwordWoVersion: 1,
targetName: "default",
threads: 4,
});
import pulumi
import pulumi_dbtcloud as dbtcloud
# Using the classic sensitive attribute (stored in state)
my_clickhouse_cred = dbtcloud.ClickhouseCredential("my_clickhouse_cred",
project_id=dbt_project["id"],
schema="my_schema",
user="my_user",
password="my_password",
target_name="default",
threads=4)
config = pulumi.Config()
clickhouse_password = config.require("clickhousePassword")
my_clickhouse_cred_wo = dbtcloud.ClickhouseCredential("my_clickhouse_cred_wo",
project_id=dbt_project["id"],
schema="my_schema",
user="my_user",
password_wo=clickhouse_password,
password_wo_version=1,
target_name="default",
threads=4)
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.NewClickhouseCredential(ctx, "my_clickhouse_cred", &dbtcloud.ClickhouseCredentialArgs{
ProjectId: pulumi.Any(dbtProject.Id),
Schema: pulumi.String("my_schema"),
User: pulumi.String("my_user"),
Password: pulumi.String("my_password"),
TargetName: pulumi.String("default"),
Threads: pulumi.Int(4),
})
if err != nil {
return err
}
cfg := config.New(ctx, "")
clickhousePassword := cfg.Require("clickhousePassword")
_, err = dbtcloud.NewClickhouseCredential(ctx, "my_clickhouse_cred_wo", &dbtcloud.ClickhouseCredentialArgs{
ProjectId: pulumi.Any(dbtProject.Id),
Schema: pulumi.String("my_schema"),
User: pulumi.String("my_user"),
PasswordWo: pulumi.String(clickhousePassword),
PasswordWoVersion: pulumi.Int(1),
TargetName: pulumi.String("default"),
Threads: pulumi.Int(4),
})
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 myClickhouseCred = new DbtCloud.ClickhouseCredential("my_clickhouse_cred", new()
{
ProjectId = dbtProject.Id,
Schema = "my_schema",
User = "my_user",
Password = "my_password",
TargetName = "default",
Threads = 4,
});
var config = new Config();
var clickhousePassword = config.Require("clickhousePassword");
var myClickhouseCredWo = new DbtCloud.ClickhouseCredential("my_clickhouse_cred_wo", new()
{
ProjectId = dbtProject.Id,
Schema = "my_schema",
User = "my_user",
PasswordWo = clickhousePassword,
PasswordWoVersion = 1,
TargetName = "default",
Threads = 4,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.dbtcloud.ClickhouseCredential;
import com.pulumi.dbtcloud.ClickhouseCredentialArgs;
import java.util.ArrayList;
import java.util.Arrays;
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 myClickhouseCred = new ClickhouseCredential("myClickhouseCred", ClickhouseCredentialArgs.builder()
.projectId(dbtProject.get("id"))
.schema("my_schema")
.user("my_user")
.password("my_password")
.targetName("default")
.threads(4)
.build());
final var clickhousePassword = config.require("clickhousePassword");
var myClickhouseCredWo = new ClickhouseCredential("myClickhouseCredWo", ClickhouseCredentialArgs.builder()
.projectId(dbtProject.get("id"))
.schema("my_schema")
.user("my_user")
.passwordWo(clickhousePassword)
.passwordWoVersion(1)
.targetName("default")
.threads(4)
.build());
}
}
configuration:
# Using the write-only attribute (not stored in state, requires Pulumi >= 1.11)
# //
# // The password_wo value is never persisted in the Pulumi state file.
# // Use password_wo_version to trigger an update when the password changes.
clickhousePassword:
type: string
resources:
# Using the classic sensitive attribute (stored in state)
myClickhouseCred:
type: dbtcloud:ClickhouseCredential
name: my_clickhouse_cred
properties:
projectId: ${dbtProject.id}
schema: my_schema
user: my_user
password: my_password
targetName: default
threads: 4
myClickhouseCredWo:
type: dbtcloud:ClickhouseCredential
name: my_clickhouse_cred_wo
properties:
projectId: ${dbtProject.id}
schema: my_schema
user: my_user
passwordWo: ${clickhousePassword}
passwordWoVersion: 1
targetName: default
threads: 4
terraform {
required_providers {
dbtcloud = {
source = "pulumi/dbtcloud"
}
}
}
# Using the classic sensitive attribute (stored in state)
resource "dbtcloud_clickhouse_credential" "my_clickhouse_cred" {
lifecycle {
create_before_destroy = true
}
project_id = dbtProject.id
schema = "my_schema"
user = "my_user"
password = "my_password"
target_name = "default"
threads = 4
}
resource "dbtcloud_clickhouse_credential" "my_clickhouse_cred_wo" {
lifecycle {
create_before_destroy = true
}
project_id = dbtProject.id
schema = "my_schema"
user = "my_user"
password_wo = var.clickhousePassword
password_wo_version = 1
target_name = "default"
threads = 4
}
// Using the write-only attribute (not stored in state, requires Pulumi >= 1.11)
//
// The password_wo value is never persisted in the Pulumi state file.
// Use password_wo_version to trigger an update when the password changes.
variable "clickhousePassword" {
type = string
}
Create ClickhouseCredential Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ClickhouseCredential(name: string, args: ClickhouseCredentialArgs, opts?: CustomResourceOptions);@overload
def ClickhouseCredential(resource_name: str,
args: ClickhouseCredentialArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ClickhouseCredential(resource_name: str,
opts: Optional[ResourceOptions] = None,
project_id: Optional[int] = None,
schema: Optional[str] = None,
user: Optional[str] = None,
password: Optional[str] = None,
password_wo: Optional[str] = None,
password_wo_version: Optional[int] = None,
target_name: Optional[str] = None,
threads: Optional[int] = None)func NewClickhouseCredential(ctx *Context, name string, args ClickhouseCredentialArgs, opts ...ResourceOption) (*ClickhouseCredential, error)public ClickhouseCredential(string name, ClickhouseCredentialArgs args, CustomResourceOptions? opts = null)
public ClickhouseCredential(String name, ClickhouseCredentialArgs args)
public ClickhouseCredential(String name, ClickhouseCredentialArgs args, CustomResourceOptions options)
type: dbtcloud:ClickhouseCredential
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "dbtcloud_clickhouse_credential" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args ClickhouseCredentialArgs
- 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 ClickhouseCredentialArgs
- 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 ClickhouseCredentialArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ClickhouseCredentialArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ClickhouseCredentialArgs
- 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 clickhouseCredentialResource = new DbtCloud.ClickhouseCredential("clickhouseCredentialResource", new()
{
ProjectId = 0,
Schema = "string",
User = "string",
Password = "string",
PasswordWo = "string",
PasswordWoVersion = 0,
TargetName = "string",
Threads = 0,
});
example, err := dbtcloud.NewClickhouseCredential(ctx, "clickhouseCredentialResource", &dbtcloud.ClickhouseCredentialArgs{
ProjectId: pulumi.Int(0),
Schema: pulumi.String("string"),
User: pulumi.String("string"),
Password: pulumi.String("string"),
PasswordWo: pulumi.String("string"),
PasswordWoVersion: pulumi.Int(0),
TargetName: pulumi.String("string"),
Threads: pulumi.Int(0),
})
resource "dbtcloud_clickhouse_credential" "clickhouseCredentialResource" {
lifecycle {
create_before_destroy = true
}
project_id = 0
schema = "string"
user = "string"
password = "string"
password_wo = "string"
password_wo_version = 0
target_name = "string"
threads = 0
}
var clickhouseCredentialResource = new ClickhouseCredential("clickhouseCredentialResource", ClickhouseCredentialArgs.builder()
.projectId(0)
.schema("string")
.user("string")
.password("string")
.passwordWo("string")
.passwordWoVersion(0)
.targetName("string")
.threads(0)
.build());
clickhouse_credential_resource = dbtcloud.ClickhouseCredential("clickhouseCredentialResource",
project_id=0,
schema="string",
user="string",
password="string",
password_wo="string",
password_wo_version=0,
target_name="string",
threads=0)
const clickhouseCredentialResource = new dbtcloud.ClickhouseCredential("clickhouseCredentialResource", {
projectId: 0,
schema: "string",
user: "string",
password: "string",
passwordWo: "string",
passwordWoVersion: 0,
targetName: "string",
threads: 0,
});
type: dbtcloud:ClickhouseCredential
properties:
password: string
passwordWo: string
passwordWoVersion: 0
projectId: 0
schema: string
targetName: string
threads: 0
user: string
ClickhouseCredential 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 ClickhouseCredential resource accepts the following input properties:
- Project
Id int - Project ID to create the ClickHouse credential in
- Schema string
- The schema where to create the dbt models
- User string
- The ClickHouse username
- Password string
- The ClickHouse password. 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. - Target
Name string - Target name
- Threads int
- The number of threads to use for dbt operations.
- Project
Id int - Project ID to create the ClickHouse credential in
- Schema string
- The schema where to create the dbt models
- User string
- The ClickHouse username
- Password string
- The ClickHouse password. 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. - Target
Name string - Target name
- Threads int
- The number of threads to use for dbt operations.
- project_
id number - Project ID to create the ClickHouse credential in
- schema string
- The schema where to create the dbt models
- user string
- The ClickHouse username
- password string
- The ClickHouse password. 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. - target_
name string - Target name
- threads number
- The number of threads to use for dbt operations.
- project
Id Integer - Project ID to create the ClickHouse credential in
- schema String
- The schema where to create the dbt models
- user String
- The ClickHouse username
- password String
- The ClickHouse password. 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. - target
Name String - Target name
- threads Integer
- The number of threads to use for dbt operations.
- project
Id number - Project ID to create the ClickHouse credential in
- schema string
- The schema where to create the dbt models
- user string
- The ClickHouse username
- password string
- The ClickHouse password. 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. - target
Name string - Target name
- threads number
- The number of threads to use for dbt operations.
- project_
id int - Project ID to create the ClickHouse credential in
- schema str
- The schema where to create the dbt models
- user str
- The ClickHouse username
- password str
- The ClickHouse password. 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. - target_
name str - Target name
- threads int
- The number of threads to use for dbt operations.
- project
Id Number - Project ID to create the ClickHouse credential in
- schema String
- The schema where to create the dbt models
- user String
- The ClickHouse username
- password String
- The ClickHouse password. 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. - target
Name String - Target name
- threads Number
- The number of threads to use for dbt operations.
Outputs
All input properties are implicitly available as output properties. Additionally, the ClickhouseCredential resource produces the following output properties:
- Credential
Id int - The system ClickHouse credential ID
- Id string
- The provider-assigned unique ID for this managed resource.
- Credential
Id int - The system ClickHouse credential ID
- Id string
- The provider-assigned unique ID for this managed resource.
- credential_
id number - The system ClickHouse credential ID
- id string
- The provider-assigned unique ID for this managed resource.
- credential
Id Integer - The system ClickHouse credential ID
- id String
- The provider-assigned unique ID for this managed resource.
- credential
Id number - The system ClickHouse credential ID
- id string
- The provider-assigned unique ID for this managed resource.
- credential_
id int - The system ClickHouse credential ID
- id str
- The provider-assigned unique ID for this managed resource.
- credential
Id Number - The system ClickHouse credential ID
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing ClickhouseCredential Resource
Get an existing ClickhouseCredential 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?: ClickhouseCredentialState, opts?: CustomResourceOptions): ClickhouseCredential@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
credential_id: Optional[int] = None,
password: Optional[str] = None,
password_wo: Optional[str] = None,
password_wo_version: Optional[int] = None,
project_id: Optional[int] = None,
schema: Optional[str] = None,
target_name: Optional[str] = None,
threads: Optional[int] = None,
user: Optional[str] = None) -> ClickhouseCredentialfunc GetClickhouseCredential(ctx *Context, name string, id IDInput, state *ClickhouseCredentialState, opts ...ResourceOption) (*ClickhouseCredential, error)public static ClickhouseCredential Get(string name, Input<string> id, ClickhouseCredentialState? state, CustomResourceOptions? opts = null)public static ClickhouseCredential get(String name, Output<String> id, ClickhouseCredentialState state, CustomResourceOptions options)resources: _: type: dbtcloud:ClickhouseCredential get: id: ${id}import {
to = dbtcloud_clickhouse_credential.example
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 system ClickHouse credential ID
- Password string
- The ClickHouse password. 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 ClickHouse credential in
- Schema string
- The schema where to create the dbt models
- Target
Name string - Target name
- Threads int
- The number of threads to use for dbt operations.
- User string
- The ClickHouse username
- Credential
Id int - The system ClickHouse credential ID
- Password string
- The ClickHouse password. 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 ClickHouse credential in
- Schema string
- The schema where to create the dbt models
- Target
Name string - Target name
- Threads int
- The number of threads to use for dbt operations.
- User string
- The ClickHouse username
- credential_
id number - The system ClickHouse credential ID
- password string
- The ClickHouse password. 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 ClickHouse credential in
- schema string
- The schema where to create the dbt models
- target_
name string - Target name
- threads number
- The number of threads to use for dbt operations.
- user string
- The ClickHouse username
- credential
Id Integer - The system ClickHouse credential ID
- password String
- The ClickHouse password. 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 ClickHouse credential in
- schema String
- The schema where to create the dbt models
- target
Name String - Target name
- threads Integer
- The number of threads to use for dbt operations.
- user String
- The ClickHouse username
- credential
Id number - The system ClickHouse credential ID
- password string
- The ClickHouse password. 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 ClickHouse credential in
- schema string
- The schema where to create the dbt models
- target
Name string - Target name
- threads number
- The number of threads to use for dbt operations.
- user string
- The ClickHouse username
- credential_
id int - The system ClickHouse credential ID
- password str
- The ClickHouse password. 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 ClickHouse credential in
- schema str
- The schema where to create the dbt models
- target_
name str - Target name
- threads int
- The number of threads to use for dbt operations.
- user str
- The ClickHouse username
- credential
Id Number - The system ClickHouse credential ID
- password String
- The ClickHouse password. 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 ClickHouse credential in
- schema String
- The schema where to create the dbt models
- target
Name String - Target name
- threads Number
- The number of threads to use for dbt operations.
- user String
- The ClickHouse username
Import
using import blocks (requires Terraform >= 1.5) import { to = dbtcloud_clickhouse_credential.my_clickhouse_credential id = “project_id:credential_id” }
import { to = dbtcloud_clickhouse_credential.my_clickhouse_credential id = “12345:6789” }
using the older import command
$ pulumi import dbtcloud:index/clickhouseCredential:ClickhouseCredential my_clickhouse_credential "project_id:credential_id"
$ pulumi import dbtcloud:index/clickhouseCredential:ClickhouseCredential my_clickhouse_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.
dbt Cloudpublished on Saturday, Oct 17, 2026 by Pulumi