1. Packages
  2. dbt Cloud Provider
  3. API Docs
  4. SparkCredential
dbt Cloud v1.3.1 published on Thursday, Nov 27, 2025 by Pulumi
dbtcloud logo
dbt Cloud v1.3.1 published on Thursday, Nov 27, 2025 by Pulumi

    Apache Spark credential resource

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as dbtcloud from "@pulumi/dbtcloud";
    
    const mySparkCred = new dbtcloud.SparkCredential("my_spark_cred", {
        projectId: dbtProject.id,
        token: "abcdefgh",
        schema: "my_schema",
    });
    
    import pulumi
    import pulumi_dbtcloud as dbtcloud
    
    my_spark_cred = dbtcloud.SparkCredential("my_spark_cred",
        project_id=dbt_project["id"],
        token="abcdefgh",
        schema="my_schema")
    
    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.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
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using DbtCloud = Pulumi.DbtCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var mySparkCred = new DbtCloud.SparkCredential("my_spark_cred", new()
        {
            ProjectId = dbtProject.Id,
            Token = "abcdefgh",
            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) {
            var mySparkCred = new SparkCredential("mySparkCred", SparkCredentialArgs.builder()
                .projectId(dbtProject.id())
                .token("abcdefgh")
                .schema("my_schema")
                .build());
    
        }
    }
    
    resources:
      mySparkCred:
        type: dbtcloud:SparkCredential
        name: my_spark_cred
        properties:
          projectId: ${dbtProject.id}
          token: abcdefgh
          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,
                        token: Optional[str] = None,
                        target_name: Optional[str] = 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",
    });
    
    example, err := dbtcloud.NewSparkCredential(ctx, "sparkCredentialResource", &dbtcloud.SparkCredentialArgs{
    	ProjectId: pulumi.Int(0),
    	Schema:    pulumi.String("string"),
    	Token:     pulumi.String("string"),
    })
    
    var sparkCredentialResource = new SparkCredential("sparkCredentialResource", SparkCredentialArgs.builder()
        .projectId(0)
        .schema("string")
        .token("string")
        .build());
    
    spark_credential_resource = dbtcloud.SparkCredential("sparkCredentialResource",
        project_id=0,
        schema="string",
        token="string")
    
    const sparkCredentialResource = new dbtcloud.SparkCredential("sparkCredentialResource", {
        projectId: 0,
        schema: "string",
        token: "string",
    });
    
    type: dbtcloud:SparkCredential
    properties:
        projectId: 0
        schema: string
        token: string
    

    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:

    ProjectId int
    Project ID to create the Apache Spark credential in
    Schema string
    The schema where to create models
    Token string
    Token for Apache Spark user
    TargetName string
    Target name

    Deprecated: This field is deprecated at the environment level (it was never possible to set it in the UI) and will be removed in a future release. Please remove it and set the target name at the job level or leverage environment variables.

    ProjectId int
    Project ID to create the Apache Spark credential in
    Schema string
    The schema where to create models
    Token string
    Token for Apache Spark user
    TargetName string
    Target name

    Deprecated: This field is deprecated at the environment level (it was never possible to set it in the UI) and will be removed in a future release. Please remove it and set the target name at the job level or leverage environment variables.

    projectId Integer
    Project ID to create the Apache Spark credential in
    schema String
    The schema where to create models
    token String
    Token for Apache Spark user
    targetName String
    Target name

    Deprecated: This field is deprecated at the environment level (it was never possible to set it in the UI) and will be removed in a future release. Please remove it and set the target name at the job level or leverage environment variables.

    projectId number
    Project ID to create the Apache Spark credential in
    schema string
    The schema where to create models
    token string
    Token for Apache Spark user
    targetName string
    Target name

    Deprecated: This field is deprecated at the environment level (it was never possible to set it in the UI) and will be removed in a future release. Please remove it and set the target name at the job level or leverage environment variables.

    project_id int
    Project ID to create the Apache Spark credential in
    schema str
    The schema where to create models
    token str
    Token for Apache Spark user
    target_name str
    Target name

    Deprecated: This field is deprecated at the environment level (it was never possible to set it in the UI) and will be removed in a future release. Please remove it and set the target name at the job level or leverage environment variables.

    projectId Number
    Project ID to create the Apache Spark credential in
    schema String
    The schema where to create models
    token String
    Token for Apache Spark user
    targetName String
    Target name

    Deprecated: This field is deprecated at the environment level (it was never possible to set it in the UI) and will be removed in a future release. Please remove it and set the target name at the job level or leverage environment variables.

    Outputs

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

    CredentialId int
    The system Apache Spark credential ID
    Id string
    The provider-assigned unique ID for this managed resource.
    CredentialId int
    The system Apache Spark credential ID
    Id string
    The provider-assigned unique ID for this managed resource.
    credentialId Integer
    The system Apache Spark credential ID
    id String
    The provider-assigned unique ID for this managed resource.
    credentialId 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.
    credentialId 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) -> SparkCredential
    func 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.
    The following state arguments are supported:
    CredentialId int
    The system Apache Spark credential ID
    ProjectId int
    Project ID to create the Apache Spark credential in
    Schema string
    The schema where to create models
    TargetName string
    Target name

    Deprecated: This field is deprecated at the environment level (it was never possible to set it in the UI) and will be removed in a future release. Please remove it and set the target name at the job level or leverage environment variables.

    Token string
    Token for Apache Spark user
    CredentialId int
    The system Apache Spark credential ID
    ProjectId int
    Project ID to create the Apache Spark credential in
    Schema string
    The schema where to create models
    TargetName string
    Target name

    Deprecated: This field is deprecated at the environment level (it was never possible to set it in the UI) and will be removed in a future release. Please remove it and set the target name at the job level or leverage environment variables.

    Token string
    Token for Apache Spark user
    credentialId Integer
    The system Apache Spark credential ID
    projectId Integer
    Project ID to create the Apache Spark credential in
    schema String
    The schema where to create models
    targetName String
    Target name

    Deprecated: This field is deprecated at the environment level (it was never possible to set it in the UI) and will be removed in a future release. Please remove it and set the target name at the job level or leverage environment variables.

    token String
    Token for Apache Spark user
    credentialId number
    The system Apache Spark credential ID
    projectId number
    Project ID to create the Apache Spark credential in
    schema string
    The schema where to create models
    targetName string
    Target name

    Deprecated: This field is deprecated at the environment level (it was never possible to set it in the UI) and will be removed in a future release. Please remove it and set the target name at the job level or leverage environment variables.

    token string
    Token for Apache Spark user
    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

    Deprecated: This field is deprecated at the environment level (it was never possible to set it in the UI) and will be removed in a future release. Please remove it and set the target name at the job level or leverage environment variables.

    token str
    Token for Apache Spark user
    credentialId Number
    The system Apache Spark credential ID
    projectId Number
    Project ID to create the Apache Spark credential in
    schema String
    The schema where to create models
    targetName String
    Target name

    Deprecated: This field is deprecated at the environment level (it was never possible to set it in the UI) and will be removed in a future release. Please remove it and set the target name at the job level or leverage environment variables.

    token String
    Token for Apache Spark user

    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 dbtcloud Terraform Provider.
    dbtcloud logo
    dbt Cloud v1.3.1 published on Thursday, Nov 27, 2025 by Pulumi
      Meet Neo: Your AI Platform Teammate