OpenStack v5.0.3 published on Wednesday, Feb 12, 2025 by Pulumi
openstack.identity.getProjectIdsV3
Explore with Pulumi AI
Use this data source to get a list of OpenStack Project IDs matching the specified criteria.
Note: You must have domain admin or cloud admin privileges in your OpenStack cloud to use this datasource.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as openstack from "@pulumi/openstack";
const projects = openstack.identity.getProjectIdsV3({
    nameRegex: "^prod.*",
});
import pulumi
import pulumi_openstack as openstack
projects = openstack.identity.get_project_ids_v3(name_regex="^prod.*")
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.GetProjectIdsV3(ctx, &identity.GetProjectIdsV3Args{
			NameRegex: pulumi.StringRef("^prod.*"),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using OpenStack = Pulumi.OpenStack;
return await Deployment.RunAsync(() => 
{
    var projects = OpenStack.Identity.GetProjectIdsV3.Invoke(new()
    {
        NameRegex = "^prod.*",
    });
});
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.GetProjectIdsV3Args;
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 projects = IdentityFunctions.getProjectIdsV3(GetProjectIdsV3Args.builder()
            .nameRegex("^prod.*")
            .build());
    }
}
variables:
  projects:
    fn::invoke:
      function: openstack:identity:getProjectIdsV3
      arguments:
        nameRegex: ^prod.*
Using getProjectIdsV3
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 getProjectIdsV3(args: GetProjectIdsV3Args, opts?: InvokeOptions): Promise<GetProjectIdsV3Result>
function getProjectIdsV3Output(args: GetProjectIdsV3OutputArgs, opts?: InvokeOptions): Output<GetProjectIdsV3Result>def get_project_ids_v3(domain_id: Optional[str] = None,
                       enabled: Optional[bool] = None,
                       is_domain: Optional[bool] = None,
                       name: Optional[str] = None,
                       name_regex: Optional[str] = None,
                       parent_id: Optional[str] = None,
                       region: Optional[str] = None,
                       tags: Optional[Sequence[str]] = None,
                       opts: Optional[InvokeOptions] = None) -> GetProjectIdsV3Result
def get_project_ids_v3_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,
                       name_regex: Optional[pulumi.Input[str]] = None,
                       parent_id: Optional[pulumi.Input[str]] = None,
                       region: Optional[pulumi.Input[str]] = None,
                       tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                       opts: Optional[InvokeOptions] = None) -> Output[GetProjectIdsV3Result]func GetProjectIdsV3(ctx *Context, args *GetProjectIdsV3Args, opts ...InvokeOption) (*GetProjectIdsV3Result, error)
func GetProjectIdsV3Output(ctx *Context, args *GetProjectIdsV3OutputArgs, opts ...InvokeOption) GetProjectIdsV3ResultOutput> Note: This function is named GetProjectIdsV3 in the Go SDK.
public static class GetProjectIdsV3 
{
    public static Task<GetProjectIdsV3Result> InvokeAsync(GetProjectIdsV3Args args, InvokeOptions? opts = null)
    public static Output<GetProjectIdsV3Result> Invoke(GetProjectIdsV3InvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetProjectIdsV3Result> getProjectIdsV3(GetProjectIdsV3Args args, InvokeOptions options)
public static Output<GetProjectIdsV3Result> getProjectIdsV3(GetProjectIdsV3Args args, InvokeOptions options)
fn::invoke:
  function: openstack:identity/getProjectIdsV3:getProjectIdsV3
  arguments:
    # arguments dictionaryThe following arguments are supported:
- DomainId string
- The domain projects belongs to.
- Enabled bool
- Whether the project is enabled or disabled. Valid
values are trueandfalse. Default istrue.
- IsDomain bool
- Name string
- The name of the project.
- NameRegex string
- The regular expression of the name of the project.
Cannot be used simultaneously with name. Unlike filtering bynamethename_regexfiltering does by client on the result of OpenStack search query.
- ParentId string
- The parent of the project.
- Region string
- List<string>
- Tags for the project.
- DomainId string
- The domain projects belongs to.
- Enabled bool
- Whether the project is enabled or disabled. Valid
values are trueandfalse. Default istrue.
- IsDomain bool
- Name string
- The name of the project.
- NameRegex string
- The regular expression of the name of the project.
Cannot be used simultaneously with name. Unlike filtering bynamethename_regexfiltering does by client on the result of OpenStack search query.
- ParentId string
- The parent of the project.
- Region string
- []string
- Tags for the project.
- domainId String
- The domain projects belongs to.
- enabled Boolean
- Whether the project is enabled or disabled. Valid
values are trueandfalse. Default istrue.
- isDomain Boolean
- name String
- The name of the project.
- nameRegex String
- The regular expression of the name of the project.
Cannot be used simultaneously with name. Unlike filtering bynamethename_regexfiltering does by client on the result of OpenStack search query.
- parentId String
- The parent of the project.
- region String
- List<String>
- Tags for the project.
- domainId string
- The domain projects belongs to.
- enabled boolean
- Whether the project is enabled or disabled. Valid
values are trueandfalse. Default istrue.
- isDomain boolean
- name string
- The name of the project.
- nameRegex string
- The regular expression of the name of the project.
Cannot be used simultaneously with name. Unlike filtering bynamethename_regexfiltering does by client on the result of OpenStack search query.
- parentId string
- The parent of the project.
- region string
- string[]
- Tags for the project.
- domain_id str
- The domain projects belongs to.
- enabled bool
- Whether the project is enabled or disabled. Valid
values are trueandfalse. Default istrue.
- is_domain bool
- name str
- The name of the project.
- name_regex str
- The regular expression of the name of the project.
Cannot be used simultaneously with name. Unlike filtering bynamethename_regexfiltering does by client on the result of OpenStack search query.
- parent_id str
- The parent of the project.
- region str
- Sequence[str]
- Tags for the project.
- domainId String
- The domain projects belongs to.
- enabled Boolean
- Whether the project is enabled or disabled. Valid
values are trueandfalse. Default istrue.
- isDomain Boolean
- name String
- The name of the project.
- nameRegex String
- The regular expression of the name of the project.
Cannot be used simultaneously with name. Unlike filtering bynamethename_regexfiltering does by client on the result of OpenStack search query.
- parentId String
- The parent of the project.
- region String
- List<String>
- Tags for the project.
getProjectIdsV3 Result
The following output properties are available:
- description str
- domain_id str
- id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- region str
- enabled bool
- is_domain bool
- name str
- name_regex str
- parent_id str
- Sequence[str]
Package Details
- Repository
- OpenStack pulumi/pulumi-openstack
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the openstackTerraform Provider.