dbt Cloud v1.0.0 published on Wednesday, Jun 11, 2025 by Pulumi
dbtcloud.getProject
Explore with Pulumi AI
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:
getProject Result
The following output properties are available:
- Created
At string - When the project was created
- Dbt
Project stringSubdirectory - Subdirectory for the dbt project inside the git repo
- Description string
- Project description
- Docs
Job intId - ID of Job for the documentation
- Freshness
Job intId - ID of Job for source freshness
- Name string
- Project name
- Project
Connection Pulumi.Dbt Cloud. Outputs. Get Project Project Connection - Details for the connection linked to the project
- Repository
Pulumi.
Dbt Cloud. Outputs. Get Project Repository - Details for the repository linked to the project
- Semantic
Layer intConfig Id - 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 string - When the project was last updated
- Id int
- Project ID
- Created
At string - When the project was created
- Dbt
Project stringSubdirectory - Subdirectory for the dbt project inside the git repo
- Description string
- Project description
- Docs
Job intId - ID of Job for the documentation
- Freshness
Job intId - ID of Job for source freshness
- Name string
- Project name
- Project
Connection GetProject Project Connection - Details for the connection linked to the project
- Repository
Get
Project Repository Type - Details for the repository linked to the project
- Semantic
Layer intConfig Id - 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 string - When the project was last updated
- Id int
- Project ID
- created
At String - When the project was created
- dbt
Project StringSubdirectory - Subdirectory for the dbt project inside the git repo
- description String
- Project description
- docs
Job IntegerId - ID of Job for the documentation
- freshness
Job IntegerId - ID of Job for source freshness
- name String
- Project name
- project
Connection GetProject Project Connection - Details for the connection linked to the project
- repository
Get
Project Repository - Details for the repository linked to the project
- semantic
Layer IntegerConfig Id - 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)
- updated
At String - When the project was last updated
- id Integer
- Project ID
- created
At string - When the project was created
- dbt
Project stringSubdirectory - Subdirectory for the dbt project inside the git repo
- description string
- Project description
- docs
Job numberId - ID of Job for the documentation
- freshness
Job numberId - ID of Job for source freshness
- name string
- Project name
- project
Connection GetProject Project Connection - Details for the connection linked to the project
- repository
Get
Project Repository - Details for the repository linked to the project
- semantic
Layer numberConfig Id - 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)
- updated
At string - When the project was last updated
- id number
- Project ID
- created_
at str - When the project was created
- dbt_
project_ strsubdirectory - Subdirectory for the dbt project inside the git repo
- description str
- Project description
- docs_
job_ intid - ID of Job for the documentation
- freshness_
job_ intid - ID of Job for source freshness
- name str
- Project name
- project_
connection GetProject Project Connection - Details for the connection linked to the project
- repository
Get
Project Repository - Details for the repository linked to the project
- semantic_
layer_ intconfig_ id - 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
- created
At String - When the project was created
- dbt
Project StringSubdirectory - Subdirectory for the dbt project inside the git repo
- description String
- Project description
- docs
Job NumberId - ID of Job for the documentation
- freshness
Job NumberId - ID of Job for source freshness
- name String
- Project name
- project
Connection Property Map - Details for the connection linked to the project
- repository Property Map
- Details for the repository linked to the project
- semantic
Layer NumberConfig Id - 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)
- updated
At String - When the project was last updated
- id Number
- Project ID
Supporting Types
GetProjectProjectConnection
- Adapter
Version string - Version of the adapter for the connection. Will tell what connection type it is
- Id int
- Connection ID
- Name string
- Connection name
- Adapter
Version string - Version of the adapter for the connection. Will tell what connection type it is
- Id int
- Connection ID
- Name string
- Connection name
- adapter
Version String - Version of the adapter for the connection. Will tell what connection type it is
- id Integer
- Connection ID
- name String
- Connection name
- adapter
Version 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
- adapter
Version 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
- Pull
Request stringUrl Template - URL template for PRs
- Remote
Url string - URL of the git repo remote
- Id int
- Repository ID
- Pull
Request stringUrl Template - URL template for PRs
- Remote
Url string - URL of the git repo remote
- id Integer
- Repository ID
- pull
Request StringUrl Template - URL template for PRs
- remote
Url String - URL of the git repo remote
- id number
- Repository ID
- pull
Request stringUrl Template - URL template for PRs
- remote
Url string - URL of the git repo remote
- id int
- Repository ID
- pull_
request_ strurl_ template - URL template for PRs
- remote_
url str - URL of the git repo remote
- id Number
- Repository ID
- pull
Request StringUrl Template - URL template for PRs
- remote
Url 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.