1. Packages
  2. dbt Cloud
  3. API Docs
  4. Project
dbt Cloud v0.1.10 published on Thursday, Jul 18, 2024 by Pulumi

dbtcloud.Project

Explore with Pulumi AI

dbtcloud logo
dbt Cloud v0.1.10 published on Thursday, Jul 18, 2024 by Pulumi

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as dbtcloud from "@pulumi/dbtcloud";
    
    const dbtProject = new dbtcloud.Project("dbt_project", {name: "Analytics"});
    const dbtProjectWithSubdir = new dbtcloud.Project("dbt_project_with_subdir", {
        name: "Analytics in Subdir",
        dbtProjectSubdirectory: "/path",
    });
    
    import pulumi
    import pulumi_dbtcloud as dbtcloud
    
    dbt_project = dbtcloud.Project("dbt_project", name="Analytics")
    dbt_project_with_subdir = dbtcloud.Project("dbt_project_with_subdir",
        name="Analytics in Subdir",
        dbt_project_subdirectory="/path")
    
    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.NewProject(ctx, "dbt_project", &dbtcloud.ProjectArgs{
    			Name: pulumi.String("Analytics"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = dbtcloud.NewProject(ctx, "dbt_project_with_subdir", &dbtcloud.ProjectArgs{
    			Name:                   pulumi.String("Analytics in Subdir"),
    			DbtProjectSubdirectory: pulumi.String("/path"),
    		})
    		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 dbtProject = new DbtCloud.Project("dbt_project", new()
        {
            Name = "Analytics",
        });
    
        var dbtProjectWithSubdir = new DbtCloud.Project("dbt_project_with_subdir", new()
        {
            Name = "Analytics in Subdir",
            DbtProjectSubdirectory = "/path",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.dbtcloud.Project;
    import com.pulumi.dbtcloud.ProjectArgs;
    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 dbtProject = new Project("dbtProject", ProjectArgs.builder()
                .name("Analytics")
                .build());
    
            var dbtProjectWithSubdir = new Project("dbtProjectWithSubdir", ProjectArgs.builder()
                .name("Analytics in Subdir")
                .dbtProjectSubdirectory("/path")
                .build());
    
        }
    }
    
    resources:
      dbtProject:
        type: dbtcloud:Project
        name: dbt_project
        properties:
          name: Analytics
      dbtProjectWithSubdir:
        type: dbtcloud:Project
        name: dbt_project_with_subdir
        properties:
          name: Analytics in Subdir
          dbtProjectSubdirectory: /path
    

    Create Project Resource

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

    Constructor syntax

    new Project(name: string, args?: ProjectArgs, opts?: CustomResourceOptions);
    @overload
    def Project(resource_name: str,
                args: Optional[ProjectArgs] = None,
                opts: Optional[ResourceOptions] = None)
    
    @overload
    def Project(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                dbt_project_subdirectory: Optional[str] = None,
                name: Optional[str] = None)
    func NewProject(ctx *Context, name string, args *ProjectArgs, opts ...ResourceOption) (*Project, error)
    public Project(string name, ProjectArgs? args = null, CustomResourceOptions? opts = null)
    public Project(String name, ProjectArgs args)
    public Project(String name, ProjectArgs args, CustomResourceOptions options)
    
    type: dbtcloud:Project
    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 ProjectArgs
    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 ProjectArgs
    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 ProjectArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ProjectArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ProjectArgs
    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 projectResource = new DbtCloud.Project("projectResource", new()
    {
        DbtProjectSubdirectory = "string",
        Name = "string",
    });
    
    example, err := dbtcloud.NewProject(ctx, "projectResource", &dbtcloud.ProjectArgs{
    	DbtProjectSubdirectory: pulumi.String("string"),
    	Name:                   pulumi.String("string"),
    })
    
    var projectResource = new Project("projectResource", ProjectArgs.builder()
        .dbtProjectSubdirectory("string")
        .name("string")
        .build());
    
    project_resource = dbtcloud.Project("projectResource",
        dbt_project_subdirectory="string",
        name="string")
    
    const projectResource = new dbtcloud.Project("projectResource", {
        dbtProjectSubdirectory: "string",
        name: "string",
    });
    
    type: dbtcloud:Project
    properties:
        dbtProjectSubdirectory: string
        name: string
    

    Project Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The Project resource accepts the following input properties:

    DbtProjectSubdirectory string
    dbt project subdirectory path
    Name string
    Project name
    DbtProjectSubdirectory string
    dbt project subdirectory path
    Name string
    Project name
    dbtProjectSubdirectory String
    dbt project subdirectory path
    name String
    Project name
    dbtProjectSubdirectory string
    dbt project subdirectory path
    name string
    Project name
    dbt_project_subdirectory str
    dbt project subdirectory path
    name str
    Project name
    dbtProjectSubdirectory String
    dbt project subdirectory path
    name String
    Project name

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing Project Resource

    Get an existing Project 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?: ProjectState, opts?: CustomResourceOptions): Project
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            dbt_project_subdirectory: Optional[str] = None,
            name: Optional[str] = None) -> Project
    func GetProject(ctx *Context, name string, id IDInput, state *ProjectState, opts ...ResourceOption) (*Project, error)
    public static Project Get(string name, Input<string> id, ProjectState? state, CustomResourceOptions? opts = null)
    public static Project get(String name, Output<String> id, ProjectState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    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:
    DbtProjectSubdirectory string
    dbt project subdirectory path
    Name string
    Project name
    DbtProjectSubdirectory string
    dbt project subdirectory path
    Name string
    Project name
    dbtProjectSubdirectory String
    dbt project subdirectory path
    name String
    Project name
    dbtProjectSubdirectory string
    dbt project subdirectory path
    name string
    Project name
    dbt_project_subdirectory str
    dbt project subdirectory path
    name str
    Project name
    dbtProjectSubdirectory String
    dbt project subdirectory path
    name String
    Project name

    Import

    using import blocks (requires Terraform >= 1.5)

    import {

    to = dbtcloud_project.my_project

    id = “project_id”

    }

    import {

    to = dbtcloud_project.my_project

    id = “12345”

    }

    using the older import command

    $ pulumi import dbtcloud:index/project:Project my_project "project_id"
    
    $ pulumi import dbtcloud:index/project:Project my_project 12345
    

    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 v0.1.10 published on Thursday, Jul 18, 2024 by Pulumi