GetProject

Get information on a single DigitalOcean project. If neither the id nor name attributes are provided, then this data source returns the default project.

Example Usage

using Pulumi;
using DigitalOcean = Pulumi.DigitalOcean;

class MyStack : Stack
{
    public MyStack()
    {
        var @default = Output.Create(DigitalOcean.GetProject.InvokeAsync());
        var staging = Output.Create(DigitalOcean.GetProject.InvokeAsync(new DigitalOcean.GetProjectArgs
        {
            Name = "My Staging Project",
        }));
    }

}

Coming soon!

import pulumi
import pulumi_digitalocean as digitalocean

default = digitalocean.get_project()
staging = digitalocean.get_project(name="My Staging Project")
import * as pulumi from "@pulumi/pulumi";
import * as digitalocean from "@pulumi/digitalocean";

const defaultProject = pulumi.output(digitalocean.getProject({ async: true }));
const staging = pulumi.output(digitalocean.getProject({
    name: "My Staging Project",
}, { async: true }));

Using GetProject

function getProject(args: GetProjectArgs, opts?: InvokeOptions): Promise<GetProjectResult>
function  get_project(id=None, name=None, opts=None)
func LookupProject(ctx *Context, args *LookupProjectArgs, opts ...InvokeOption) (*LookupProjectResult, error)

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

public static class GetProject {
    public static Task<GetProjectResult> InvokeAsync(GetProjectArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

Id string

the ID of the project to retrieve

Name string

the name of the project to retrieve. The data source will raise an error if more than one project has the provided name or if no project has that name.

Id string

the ID of the project to retrieve

Name string

the name of the project to retrieve. The data source will raise an error if more than one project has the provided name or if no project has that name.

id string

the ID of the project to retrieve

name string

the name of the project to retrieve. The data source will raise an error if more than one project has the provided name or if no project has that name.

id str

the ID of the project to retrieve

name str

the name of the project to retrieve. The data source will raise an error if more than one project has the provided name or if no project has that name.

GetProject Result

The following output properties are available:

CreatedAt string

The date and time when the project was created, (ISO8601)

Description string

The description of the project

Environment string

The environment of the project’s resources. The possible values are: Development, Staging, Production.

Id string
IsDefault bool
Name string
OwnerId int

The ID of the project owner.

OwnerUuid string

The unique universal identifier of the project owner.

Purpose string

The purpose of the project, (Default: “Web Application”)

Resources List<string>

A set of uniform resource names (URNs) for the resources associated with the project

UpdatedAt string

The date and time when the project was last updated, (ISO8601)

CreatedAt string

The date and time when the project was created, (ISO8601)

Description string

The description of the project

Environment string

The environment of the project’s resources. The possible values are: Development, Staging, Production.

Id string
IsDefault bool
Name string
OwnerId int

The ID of the project owner.

OwnerUuid string

The unique universal identifier of the project owner.

Purpose string

The purpose of the project, (Default: “Web Application”)

Resources []string

A set of uniform resource names (URNs) for the resources associated with the project

UpdatedAt string

The date and time when the project was last updated, (ISO8601)

createdAt string

The date and time when the project was created, (ISO8601)

description string

The description of the project

environment string

The environment of the project’s resources. The possible values are: Development, Staging, Production.

id string
isDefault boolean
name string
ownerId number

The ID of the project owner.

ownerUuid string

The unique universal identifier of the project owner.

purpose string

The purpose of the project, (Default: “Web Application”)

resources string[]

A set of uniform resource names (URNs) for the resources associated with the project

updatedAt string

The date and time when the project was last updated, (ISO8601)

created_at str

The date and time when the project was created, (ISO8601)

description str

The description of the project

environment str

The environment of the project’s resources. The possible values are: Development, Staging, Production.

id str
is_default bool
name str
owner_id float

The ID of the project owner.

owner_uuid str

The unique universal identifier of the project owner.

purpose str

The purpose of the project, (Default: “Web Application”)

resources List[str]

A set of uniform resource names (URNs) for the resources associated with the project

updated_at str

The date and time when the project was last updated, (ISO8601)

Package Details

Repository
https://github.com/pulumi/pulumi-digitalocean
License
Apache-2.0
Notes
This Pulumi package is based on the digitalocean Terraform Provider.