1. Packages
  2. Openstack Provider
  3. API Docs
  4. identity
  5. getProject
OpenStack v5.0.3 published on Wednesday, Feb 12, 2025 by Pulumi

openstack.identity.getProject

Explore with Pulumi AI

OpenStack v5.0.3 published on Wednesday, Feb 12, 2025 by Pulumi

Use this data source to get the ID of an OpenStack project.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as openstack from "@pulumi/openstack";

const project1 = openstack.identity.getProject({
    name: "demo",
});
Copy
import pulumi
import pulumi_openstack as openstack

project1 = openstack.identity.get_project(name="demo")
Copy
package main

import (
	"github.com/pulumi/pulumi-openstack/sdk/v5/go/openstack/identity"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := identity.LookupProject(ctx, &identity.LookupProjectArgs{
			Name: pulumi.StringRef("demo"),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using OpenStack = Pulumi.OpenStack;

return await Deployment.RunAsync(() => 
{
    var project1 = OpenStack.Identity.GetProject.Invoke(new()
    {
        Name = "demo",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.openstack.identity.IdentityFunctions;
import com.pulumi.openstack.identity.inputs.GetProjectArgs;
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) {
        final var project1 = IdentityFunctions.getProject(GetProjectArgs.builder()
            .name("demo")
            .build());

    }
}
Copy
variables:
  project1:
    fn::invoke:
      function: openstack:identity:getProject
      arguments:
        name: demo
Copy

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>
Copy
def get_project(domain_id: Optional[str] = None,
                enabled: Optional[bool] = None,
                is_domain: Optional[bool] = None,
                name: Optional[str] = None,
                parent_id: Optional[str] = None,
                project_id: Optional[str] = None,
                region: Optional[str] = None,
                opts: Optional[InvokeOptions] = None) -> GetProjectResult
def get_project_output(domain_id: Optional[pulumi.Input[str]] = None,
                enabled: Optional[pulumi.Input[bool]] = None,
                is_domain: Optional[pulumi.Input[bool]] = None,
                name: Optional[pulumi.Input[str]] = None,
                parent_id: Optional[pulumi.Input[str]] = None,
                project_id: Optional[pulumi.Input[str]] = None,
                region: Optional[pulumi.Input[str]] = None,
                opts: Optional[InvokeOptions] = None) -> Output[GetProjectResult]
Copy
func LookupProject(ctx *Context, args *LookupProjectArgs, opts ...InvokeOption) (*LookupProjectResult, error)
func LookupProjectOutput(ctx *Context, args *LookupProjectOutputArgs, opts ...InvokeOption) LookupProjectResultOutput
Copy

> 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)
}
Copy
public static CompletableFuture<GetProjectResult> getProject(GetProjectArgs args, InvokeOptions options)
public static Output<GetProjectResult> getProject(GetProjectArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: openstack:identity/getProject:getProject
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

DomainId string
The domain this project belongs to.
Enabled bool
Whether the project is enabled or disabled. Valid values are true and false.
IsDomain bool
Whether this project is a domain. Valid values are true and false.
Name string
The name of the project.
ParentId string
The parent of this project.
ProjectId Changes to this property will trigger replacement. string
The id of the project. Conflicts with any of the above arguments.
Region Changes to this property will trigger replacement. string
The region the project is located in.
DomainId string
The domain this project belongs to.
Enabled bool
Whether the project is enabled or disabled. Valid values are true and false.
IsDomain bool
Whether this project is a domain. Valid values are true and false.
Name string
The name of the project.
ParentId string
The parent of this project.
ProjectId Changes to this property will trigger replacement. string
The id of the project. Conflicts with any of the above arguments.
Region Changes to this property will trigger replacement. string
The region the project is located in.
domainId String
The domain this project belongs to.
enabled Boolean
Whether the project is enabled or disabled. Valid values are true and false.
isDomain Boolean
Whether this project is a domain. Valid values are true and false.
name String
The name of the project.
parentId String
The parent of this project.
projectId Changes to this property will trigger replacement. String
The id of the project. Conflicts with any of the above arguments.
region Changes to this property will trigger replacement. String
The region the project is located in.
domainId string
The domain this project belongs to.
enabled boolean
Whether the project is enabled or disabled. Valid values are true and false.
isDomain boolean
Whether this project is a domain. Valid values are true and false.
name string
The name of the project.
parentId string
The parent of this project.
projectId Changes to this property will trigger replacement. string
The id of the project. Conflicts with any of the above arguments.
region Changes to this property will trigger replacement. string
The region the project is located in.
domain_id str
The domain this project belongs to.
enabled bool
Whether the project is enabled or disabled. Valid values are true and false.
is_domain bool
Whether this project is a domain. Valid values are true and false.
name str
The name of the project.
parent_id str
The parent of this project.
project_id Changes to this property will trigger replacement. str
The id of the project. Conflicts with any of the above arguments.
region Changes to this property will trigger replacement. str
The region the project is located in.
domainId String
The domain this project belongs to.
enabled Boolean
Whether the project is enabled or disabled. Valid values are true and false.
isDomain Boolean
Whether this project is a domain. Valid values are true and false.
name String
The name of the project.
parentId String
The parent of this project.
projectId Changes to this property will trigger replacement. String
The id of the project. Conflicts with any of the above arguments.
region Changes to this property will trigger replacement. String
The region the project is located in.

getProject Result

The following output properties are available:

Description string
The description of the project.
DomainId string
See Argument Reference above.
Id string
The provider-assigned unique ID for this managed resource.
Region string
The region the project is located in.
Tags List<string>
See Argument Reference above.
Enabled bool
See Argument Reference above.
IsDomain bool
See Argument Reference above.
Name string
See Argument Reference above.
ParentId string
See Argument Reference above.
ProjectId string
See Argument Reference above.
Description string
The description of the project.
DomainId string
See Argument Reference above.
Id string
The provider-assigned unique ID for this managed resource.
Region string
The region the project is located in.
Tags []string
See Argument Reference above.
Enabled bool
See Argument Reference above.
IsDomain bool
See Argument Reference above.
Name string
See Argument Reference above.
ParentId string
See Argument Reference above.
ProjectId string
See Argument Reference above.
description String
The description of the project.
domainId String
See Argument Reference above.
id String
The provider-assigned unique ID for this managed resource.
region String
The region the project is located in.
tags List<String>
See Argument Reference above.
enabled Boolean
See Argument Reference above.
isDomain Boolean
See Argument Reference above.
name String
See Argument Reference above.
parentId String
See Argument Reference above.
projectId String
See Argument Reference above.
description string
The description of the project.
domainId string
See Argument Reference above.
id string
The provider-assigned unique ID for this managed resource.
region string
The region the project is located in.
tags string[]
See Argument Reference above.
enabled boolean
See Argument Reference above.
isDomain boolean
See Argument Reference above.
name string
See Argument Reference above.
parentId string
See Argument Reference above.
projectId string
See Argument Reference above.
description str
The description of the project.
domain_id str
See Argument Reference above.
id str
The provider-assigned unique ID for this managed resource.
region str
The region the project is located in.
tags Sequence[str]
See Argument Reference above.
enabled bool
See Argument Reference above.
is_domain bool
See Argument Reference above.
name str
See Argument Reference above.
parent_id str
See Argument Reference above.
project_id str
See Argument Reference above.
description String
The description of the project.
domainId String
See Argument Reference above.
id String
The provider-assigned unique ID for this managed resource.
region String
The region the project is located in.
tags List<String>
See Argument Reference above.
enabled Boolean
See Argument Reference above.
isDomain Boolean
See Argument Reference above.
name String
See Argument Reference above.
parentId String
See Argument Reference above.
projectId String
See Argument Reference above.

Package Details

Repository
OpenStack pulumi/pulumi-openstack
License
Apache-2.0
Notes
This Pulumi package is based on the openstack Terraform Provider.
OpenStack v5.0.3 published on Wednesday, Feb 12, 2025 by Pulumi