1. Packages
  2. dbt Cloud Provider
  3. API Docs
  4. getProject
dbt Cloud v1.0.0 published on Wednesday, Jun 11, 2025 by Pulumi

dbtcloud.getProject

Explore with Pulumi AI

dbtcloud logo
dbt Cloud v1.0.0 published on Wednesday, Jun 11, 2025 by Pulumi

    Retrieve a specific project from dbt Cloud.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as dbtcloud from "@pulumi/dbtcloud";
    
    export = async () => {
        // projects data sources can use the project_id parameter (preferred uniqueness is ensured)
        const projectById = await dbtcloud.getProject({
            id: 0,
        });
        // or they can use project names
        // the provider will raise an error if more than one project is found with the same name
        const projectByName = await dbtcloud.getProject({
            name: "Project name",
        });
        const filteredProjects = await dbtcloud.getProjects({
            nameContains: "Project",
        });
        const allProjects = await dbtcloud.getProjects({});
        return {
            projectIdDetails: projectById,
            projectNameDetails: projectByName,
            filteredProjectsCount: filteredProjects.projects.length,
            filteredProjects: filteredProjects.projects,
            projectNames: .map(project => (project.name)),
        };
    }
    
    import pulumi
    import pulumi_dbtcloud as dbtcloud
    
    # projects data sources can use the project_id parameter (preferred uniqueness is ensured)
    project_by_id = dbtcloud.get_project(id=0)
    # or they can use project names
    # the provider will raise an error if more than one project is found with the same name
    project_by_name = dbtcloud.get_project(name="Project name")
    filtered_projects = dbtcloud.get_projects(name_contains="Project")
    all_projects = dbtcloud.get_projects()
    pulumi.export("projectIdDetails", project_by_id)
    pulumi.export("projectNameDetails", project_by_name)
    pulumi.export("filteredProjectsCount", len(filtered_projects.projects))
    pulumi.export("filteredProjects", filtered_projects.projects)
    pulumi.export("projectNames", [project.name for project in filtered_projects.projects])
    
    Coming soon!
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using DbtCloud = Pulumi.DbtCloud;
    
    return await Deployment.RunAsync(() => 
    {
        // projects data sources can use the project_id parameter (preferred uniqueness is ensured)
        var projectById = DbtCloud.GetProject.Invoke(new()
        {
            Id = 0,
        });
    
        // or they can use project names
        // the provider will raise an error if more than one project is found with the same name
        var projectByName = DbtCloud.GetProject.Invoke(new()
        {
            Name = "Project name",
        });
    
        var filteredProjects = DbtCloud.GetProjects.Invoke(new()
        {
            NameContains = "Project",
        });
    
        var allProjects = DbtCloud.GetProjects.Invoke();
    
        return new Dictionary<string, object?>
        {
            ["projectIdDetails"] = projectById,
            ["projectNameDetails"] = projectByName,
            ["filteredProjectsCount"] = filteredProjects.Apply(getProjectsResult => getProjectsResult.Projects).Length,
            ["filteredProjects"] = filteredProjects.Apply(getProjectsResult => getProjectsResult.Projects),
            ["projectNames"] = .Select(project => 
            {
                return project.Name;
            }).ToList(),
        };
    });
    
    Coming soon!
    
    Coming soon!
    

    Using getProject

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getProject(args: GetProjectArgs, opts?: InvokeOptions): Promise<GetProjectResult>
    function getProjectOutput(args: GetProjectOutputArgs, opts?: InvokeOptions): Output<GetProjectResult>
    def get_project(id: Optional[int] = None,
                    name: Optional[str] = None,
                    opts: Optional[InvokeOptions] = None) -> GetProjectResult
    def get_project_output(id: Optional[pulumi.Input[int]] = None,
                    name: Optional[pulumi.Input[str]] = None,
                    opts: Optional[InvokeOptions] = None) -> Output[GetProjectResult]
    func LookupProject(ctx *Context, args *LookupProjectArgs, opts ...InvokeOption) (*LookupProjectResult, error)
    func LookupProjectOutput(ctx *Context, args *LookupProjectOutputArgs, opts ...InvokeOption) LookupProjectResultOutput

    > Note: This function is named LookupProject in the Go SDK.

    public static class GetProject 
    {
        public static Task<GetProjectResult> InvokeAsync(GetProjectArgs args, InvokeOptions? opts = null)
        public static Output<GetProjectResult> Invoke(GetProjectInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetProjectResult> getProject(GetProjectArgs args, InvokeOptions options)
    public static Output<GetProjectResult> getProject(GetProjectArgs args, InvokeOptions options)
    
    fn::invoke:
      function: dbtcloud:index/getProject:getProject
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Id int
    Project ID
    Name string
    Project name
    Id int
    Project ID
    Name string
    Project name
    id Integer
    Project ID
    name String
    Project name
    id number
    Project ID
    name string
    Project name
    id int
    Project ID
    name str
    Project name
    id Number
    Project ID
    name String
    Project name

    getProject Result

    The following output properties are available:

    CreatedAt string
    When the project was created
    DbtProjectSubdirectory string
    Subdirectory for the dbt project inside the git repo
    Description string
    Project description
    DocsJobId int
    ID of Job for the documentation
    FreshnessJobId int
    ID of Job for source freshness
    Name string
    Project name
    ProjectConnection Pulumi.DbtCloud.Outputs.GetProjectProjectConnection
    Details for the connection linked to the project
    Repository Pulumi.DbtCloud.Outputs.GetProjectRepository
    Details for the repository linked to the project
    SemanticLayerConfigId int
    Semantic layer config ID
    State int
    Project state should be 1 = active, as 2 = deleted
    Type int
    The type of dbt project (default or hybrid)
    UpdatedAt string
    When the project was last updated
    Id int
    Project ID
    CreatedAt string
    When the project was created
    DbtProjectSubdirectory string
    Subdirectory for the dbt project inside the git repo
    Description string
    Project description
    DocsJobId int
    ID of Job for the documentation
    FreshnessJobId int
    ID of Job for source freshness
    Name string
    Project name
    ProjectConnection GetProjectProjectConnection
    Details for the connection linked to the project
    Repository GetProjectRepositoryType
    Details for the repository linked to the project
    SemanticLayerConfigId int
    Semantic layer config ID
    State int
    Project state should be 1 = active, as 2 = deleted
    Type int
    The type of dbt project (default or hybrid)
    UpdatedAt string
    When the project was last updated
    Id int
    Project ID
    createdAt String
    When the project was created
    dbtProjectSubdirectory String
    Subdirectory for the dbt project inside the git repo
    description String
    Project description
    docsJobId Integer
    ID of Job for the documentation
    freshnessJobId Integer
    ID of Job for source freshness
    name String
    Project name
    projectConnection GetProjectProjectConnection
    Details for the connection linked to the project
    repository GetProjectRepository
    Details for the repository linked to the project
    semanticLayerConfigId Integer
    Semantic layer config ID
    state Integer
    Project state should be 1 = active, as 2 = deleted
    type Integer
    The type of dbt project (default or hybrid)
    updatedAt String
    When the project was last updated
    id Integer
    Project ID
    createdAt string
    When the project was created
    dbtProjectSubdirectory string
    Subdirectory for the dbt project inside the git repo
    description string
    Project description
    docsJobId number
    ID of Job for the documentation
    freshnessJobId number
    ID of Job for source freshness
    name string
    Project name
    projectConnection GetProjectProjectConnection
    Details for the connection linked to the project
    repository GetProjectRepository
    Details for the repository linked to the project
    semanticLayerConfigId number
    Semantic layer config ID
    state number
    Project state should be 1 = active, as 2 = deleted
    type number
    The type of dbt project (default or hybrid)
    updatedAt string
    When the project was last updated
    id number
    Project ID
    created_at str
    When the project was created
    dbt_project_subdirectory str
    Subdirectory for the dbt project inside the git repo
    description str
    Project description
    docs_job_id int
    ID of Job for the documentation
    freshness_job_id int
    ID of Job for source freshness
    name str
    Project name
    project_connection GetProjectProjectConnection
    Details for the connection linked to the project
    repository GetProjectRepository
    Details for the repository linked to the project
    semantic_layer_config_id int
    Semantic layer config ID
    state int
    Project state should be 1 = active, as 2 = deleted
    type int
    The type of dbt project (default or hybrid)
    updated_at str
    When the project was last updated
    id int
    Project ID
    createdAt String
    When the project was created
    dbtProjectSubdirectory String
    Subdirectory for the dbt project inside the git repo
    description String
    Project description
    docsJobId Number
    ID of Job for the documentation
    freshnessJobId Number
    ID of Job for source freshness
    name String
    Project name
    projectConnection Property Map
    Details for the connection linked to the project
    repository Property Map
    Details for the repository linked to the project
    semanticLayerConfigId Number
    Semantic layer config ID
    state Number
    Project state should be 1 = active, as 2 = deleted
    type Number
    The type of dbt project (default or hybrid)
    updatedAt String
    When the project was last updated
    id Number
    Project ID

    Supporting Types

    GetProjectProjectConnection

    AdapterVersion string
    Version of the adapter for the connection. Will tell what connection type it is
    Id int
    Connection ID
    Name string
    Connection name
    AdapterVersion string
    Version of the adapter for the connection. Will tell what connection type it is
    Id int
    Connection ID
    Name string
    Connection name
    adapterVersion String
    Version of the adapter for the connection. Will tell what connection type it is
    id Integer
    Connection ID
    name String
    Connection name
    adapterVersion string
    Version of the adapter for the connection. Will tell what connection type it is
    id number
    Connection ID
    name string
    Connection name
    adapter_version str
    Version of the adapter for the connection. Will tell what connection type it is
    id int
    Connection ID
    name str
    Connection name
    adapterVersion String
    Version of the adapter for the connection. Will tell what connection type it is
    id Number
    Connection ID
    name String
    Connection name

    GetProjectRepository

    Id int
    Repository ID
    PullRequestUrlTemplate string
    URL template for PRs
    RemoteUrl string
    URL of the git repo remote
    Id int
    Repository ID
    PullRequestUrlTemplate string
    URL template for PRs
    RemoteUrl string
    URL of the git repo remote
    id Integer
    Repository ID
    pullRequestUrlTemplate String
    URL template for PRs
    remoteUrl String
    URL of the git repo remote
    id number
    Repository ID
    pullRequestUrlTemplate string
    URL template for PRs
    remoteUrl string
    URL of the git repo remote
    id int
    Repository ID
    pull_request_url_template str
    URL template for PRs
    remote_url str
    URL of the git repo remote
    id Number
    Repository ID
    pullRequestUrlTemplate String
    URL template for PRs
    remoteUrl String
    URL of the git repo remote

    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.0.0 published on Wednesday, Jun 11, 2025 by Pulumi