published on Friday, May 8, 2026 by Pulumi
published on Friday, May 8, 2026 by Pulumi
Apache Spark 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 mySparkCred = new dbtcloud.SparkCredential("my_spark_cred", {
projectId: dbtProject.id,
token: "abcdefgh",
schema: "my_schema",
});
const config = new pulumi.Config();
const sparkToken = config.require("sparkToken");
const mySparkCredWo = new dbtcloud.SparkCredential("my_spark_cred_wo", {
projectId: dbtProject.id,
tokenWo: sparkToken,
tokenWoVersion: 1,
schema: "my_schema",
});
import pulumi
import pulumi_dbtcloud as dbtcloud
# Using the classic sensitive attribute (stored in state)
my_spark_cred = dbtcloud.SparkCredential("my_spark_cred",
project_id=dbt_project["id"],
token="abcdefgh",
schema="my_schema")
config = pulumi.Config()
spark_token = config.require("sparkToken")
my_spark_cred_wo = dbtcloud.SparkCredential("my_spark_cred_wo",
project_id=dbt_project["id"],
token_wo=spark_token,
token_wo_version=1,
schema="my_schema")
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.NewSparkCredential(ctx, "my_spark_cred", &dbtcloud.SparkCredentialArgs{
ProjectId: pulumi.Any(dbtProject.Id),
Token: pulumi.String("abcdefgh"),
Schema: pulumi.String("my_schema"),
})
if err != nil {
return err
}
cfg := config.New(ctx, "")
sparkToken := cfg.Require("sparkToken")
_, err = dbtcloud.NewSparkCredential(ctx, "my_spark_cred_wo", &dbtcloud.SparkCredentialArgs{
ProjectId: pulumi.Any(dbtProject.Id),
TokenWo: pulumi.String(pulumi.String(sparkToken)),
TokenWoVersion: pulumi.Int(1),
Schema: pulumi.String("my_schema"),
})
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 mySparkCred = new DbtCloud.Index.SparkCredential("my_spark_cred", new()
{
ProjectId = dbtProject.Id,
Token = "abcdefgh",
Schema = "my_schema",
});
var config = new Config();
var sparkToken = config.Require("sparkToken");
var mySparkCredWo = new DbtCloud.Index.SparkCredential("my_spark_cred_wo", new()
{
ProjectId = dbtProject.Id,
TokenWo = sparkToken,
TokenWoVersion = 1,
Schema = "my_schema",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.dbtcloud.SparkCredential;
import com.pulumi.dbtcloud.SparkCredentialArgs;
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 mySparkCred = new SparkCredential("mySparkCred", SparkCredentialArgs.builder()
.projectId(dbtProject.id())
.token("abcdefgh")
.schema("my_schema")
.build());
final var sparkToken = config.require("sparkToken");
var mySparkCredWo = new SparkCredential("mySparkCredWo", SparkCredentialArgs.builder()
.projectId(dbtProject.id())
.tokenWo(sparkToken)
.tokenWoVersion(1)
.schema("my_schema")
.build());
}
}
configuration:
# Using write-only attributes (not stored in state, requires Terraform >= 1.11)
# //
# // The token_wo value is never persisted in the Terraform state file.
# // Use token_wo_version to trigger an update when the token changes.
sparkToken:
type: string
resources:
# Using the classic sensitive attribute (stored in state)
mySparkCred:
type: dbtcloud:SparkCredential
name: my_spark_cred
properties:
projectId: ${dbtProject.id}
token: abcdefgh
schema: my_schema
mySparkCredWo:
type: dbtcloud:SparkCredential
name: my_spark_cred_wo
properties:
projectId: ${dbtProject.id}
tokenWo: ${sparkToken}
tokenWoVersion: 1
schema: my_schema
Create SparkCredential Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new SparkCredential(name: string, args: SparkCredentialArgs, opts?: CustomResourceOptions);@overload
def SparkCredential(resource_name: str,
args: SparkCredentialArgs,
opts: Optional[ResourceOptions] = None)
@overload
def SparkCredential(resource_name: str,
opts: Optional[ResourceOptions] = None,
project_id: Optional[int] = None,
schema: Optional[str] = None,
target_name: Optional[str] = None,
token: Optional[str] = None,
token_wo: Optional[str] = None,
token_wo_version: Optional[int] = None)func NewSparkCredential(ctx *Context, name string, args SparkCredentialArgs, opts ...ResourceOption) (*SparkCredential, error)public SparkCredential(string name, SparkCredentialArgs args, CustomResourceOptions? opts = null)
public SparkCredential(String name, SparkCredentialArgs args)
public SparkCredential(String name, SparkCredentialArgs args, CustomResourceOptions options)
type: dbtcloud:SparkCredential
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 SparkCredentialArgs
- 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 SparkCredentialArgs
- 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 SparkCredentialArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args SparkCredentialArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args SparkCredentialArgs
- 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 sparkCredentialResource = new DbtCloud.SparkCredential("sparkCredentialResource", new()
{
ProjectId = 0,
Schema = "string",
Token = "string",
TokenWo = "string",
TokenWoVersion = 0,
});
example, err := dbtcloud.NewSparkCredential(ctx, "sparkCredentialResource", &dbtcloud.SparkCredentialArgs{
ProjectId: pulumi.Int(0),
Schema: pulumi.String("string"),
Token: pulumi.String("string"),
TokenWo: pulumi.String("string"),
TokenWoVersion: pulumi.Int(0),
})
var sparkCredentialResource = new SparkCredential("sparkCredentialResource", SparkCredentialArgs.builder()
.projectId(0)
.schema("string")
.token("string")
.tokenWo("string")
.tokenWoVersion(0)
.build());
spark_credential_resource = dbtcloud.SparkCredential("sparkCredentialResource",
project_id=0,
schema="string",
token="string",
token_wo="string",
token_wo_version=0)
const sparkCredentialResource = new dbtcloud.SparkCredential("sparkCredentialResource", {
projectId: 0,
schema: "string",
token: "string",
tokenWo: "string",
tokenWoVersion: 0,
});
type: dbtcloud:SparkCredential
properties:
projectId: 0
schema: string
token: string
tokenWo: string
tokenWoVersion: 0
SparkCredential 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 SparkCredential resource accepts the following input properties:
- Project
Id int - Project ID to create the Apache Spark credential in
- Schema string
- The schema where to create models
- Target
Name string - Target name
- Token string
- Token for Apache Spark user. Consider using
tokenWoinstead, which is not stored in state. - Token
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
token. The value is not stored in state. RequirestokenWoVersionto trigger updates. - Token
Wo intVersion - Version number for
tokenWo. Increment this value to trigger an update of the token when usingtokenWo.
- Project
Id int - Project ID to create the Apache Spark credential in
- Schema string
- The schema where to create models
- Target
Name string - Target name
- Token string
- Token for Apache Spark user. Consider using
tokenWoinstead, which is not stored in state. - Token
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
token. The value is not stored in state. RequirestokenWoVersionto trigger updates. - Token
Wo intVersion - Version number for
tokenWo. Increment this value to trigger an update of the token when usingtokenWo.
- project
Id Integer - Project ID to create the Apache Spark credential in
- schema String
- The schema where to create models
- target
Name String - Target name
- token String
- Token for Apache Spark user. Consider using
tokenWoinstead, which is not stored in state. - token
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
token. The value is not stored in state. RequirestokenWoVersionto trigger updates. - token
Wo IntegerVersion - Version number for
tokenWo. Increment this value to trigger an update of the token when usingtokenWo.
- project
Id number - Project ID to create the Apache Spark credential in
- schema string
- The schema where to create models
- target
Name string - Target name
- token string
- Token for Apache Spark user. Consider using
tokenWoinstead, which is not stored in state. - token
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
token. The value is not stored in state. RequirestokenWoVersionto trigger updates. - token
Wo numberVersion - Version number for
tokenWo. Increment this value to trigger an update of the token when usingtokenWo.
- project_
id int - Project ID to create the Apache Spark credential in
- schema str
- The schema where to create models
- target_
name str - Target name
- token str
- Token for Apache Spark user. Consider using
tokenWoinstead, which is not stored in state. - token_
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
token. The value is not stored in state. RequirestokenWoVersionto trigger updates. - token_
wo_ intversion - Version number for
tokenWo. Increment this value to trigger an update of the token when usingtokenWo.
- project
Id Number - Project ID to create the Apache Spark credential in
- schema String
- The schema where to create models
- target
Name String - Target name
- token String
- Token for Apache Spark user. Consider using
tokenWoinstead, which is not stored in state. - token
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
token. The value is not stored in state. RequirestokenWoVersionto trigger updates. - token
Wo NumberVersion - Version number for
tokenWo. Increment this value to trigger an update of the token when usingtokenWo.
Outputs
All input properties are implicitly available as output properties. Additionally, the SparkCredential resource produces the following output properties:
- Credential
Id int - The system Apache Spark credential ID
- Id string
- The provider-assigned unique ID for this managed resource.
- Credential
Id int - The system Apache Spark credential ID
- Id string
- The provider-assigned unique ID for this managed resource.
- credential
Id Integer - The system Apache Spark credential ID
- id String
- The provider-assigned unique ID for this managed resource.
- credential
Id number - The system Apache Spark credential ID
- id string
- The provider-assigned unique ID for this managed resource.
- credential_
id int - The system Apache Spark credential ID
- id str
- The provider-assigned unique ID for this managed resource.
- credential
Id Number - The system Apache Spark credential ID
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing SparkCredential Resource
Get an existing SparkCredential 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?: SparkCredentialState, opts?: CustomResourceOptions): SparkCredential@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
credential_id: Optional[int] = None,
project_id: Optional[int] = None,
schema: Optional[str] = None,
target_name: Optional[str] = None,
token: Optional[str] = None,
token_wo: Optional[str] = None,
token_wo_version: Optional[int] = None) -> SparkCredentialfunc GetSparkCredential(ctx *Context, name string, id IDInput, state *SparkCredentialState, opts ...ResourceOption) (*SparkCredential, error)public static SparkCredential Get(string name, Input<string> id, SparkCredentialState? state, CustomResourceOptions? opts = null)public static SparkCredential get(String name, Output<String> id, SparkCredentialState state, CustomResourceOptions options)resources: _: type: dbtcloud:SparkCredential 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 system Apache Spark credential ID
- Project
Id int - Project ID to create the Apache Spark credential in
- Schema string
- The schema where to create models
- Target
Name string - Target name
- Token string
- Token for Apache Spark user. Consider using
tokenWoinstead, which is not stored in state. - Token
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
token. The value is not stored in state. RequirestokenWoVersionto trigger updates. - Token
Wo intVersion - Version number for
tokenWo. Increment this value to trigger an update of the token when usingtokenWo.
- Credential
Id int - The system Apache Spark credential ID
- Project
Id int - Project ID to create the Apache Spark credential in
- Schema string
- The schema where to create models
- Target
Name string - Target name
- Token string
- Token for Apache Spark user. Consider using
tokenWoinstead, which is not stored in state. - Token
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
token. The value is not stored in state. RequirestokenWoVersionto trigger updates. - Token
Wo intVersion - Version number for
tokenWo. Increment this value to trigger an update of the token when usingtokenWo.
- credential
Id Integer - The system Apache Spark credential ID
- project
Id Integer - Project ID to create the Apache Spark credential in
- schema String
- The schema where to create models
- target
Name String - Target name
- token String
- Token for Apache Spark user. Consider using
tokenWoinstead, which is not stored in state. - token
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
token. The value is not stored in state. RequirestokenWoVersionto trigger updates. - token
Wo IntegerVersion - Version number for
tokenWo. Increment this value to trigger an update of the token when usingtokenWo.
- credential
Id number - The system Apache Spark credential ID
- project
Id number - Project ID to create the Apache Spark credential in
- schema string
- The schema where to create models
- target
Name string - Target name
- token string
- Token for Apache Spark user. Consider using
tokenWoinstead, which is not stored in state. - token
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
token. The value is not stored in state. RequirestokenWoVersionto trigger updates. - token
Wo numberVersion - Version number for
tokenWo. Increment this value to trigger an update of the token when usingtokenWo.
- credential_
id int - The system Apache Spark credential ID
- project_
id int - Project ID to create the Apache Spark credential in
- schema str
- The schema where to create models
- target_
name str - Target name
- token str
- Token for Apache Spark user. Consider using
tokenWoinstead, which is not stored in state. - token_
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
token. The value is not stored in state. RequirestokenWoVersionto trigger updates. - token_
wo_ intversion - Version number for
tokenWo. Increment this value to trigger an update of the token when usingtokenWo.
- credential
Id Number - The system Apache Spark credential ID
- project
Id Number - Project ID to create the Apache Spark credential in
- schema String
- The schema where to create models
- target
Name String - Target name
- token String
- Token for Apache Spark user. Consider using
tokenWoinstead, which is not stored in state. - token
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
token. The value is not stored in state. RequirestokenWoVersionto trigger updates. - token
Wo NumberVersion - Version number for
tokenWo. Increment this value to trigger an update of the token when usingtokenWo.
Import
using import blocks (requires Terraform >= 1.5) import { to = dbtcloud_spark_credential.my_spark_credential id = “project_id:credential_id” }
import { to = dbtcloud_spark_credential.my_spark_credential id = “12345:6789” }
using the older import command
$ pulumi import dbtcloud:index/sparkCredential:SparkCredential my_spark_credential "project_id:credential_id"
$ pulumi import dbtcloud:index/sparkCredential:SparkCredential my_spark_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
