1. Packages
  2. Openstack Provider
  3. API Docs
  4. identity
  5. getGroup
OpenStack v5.0.0 published on Friday, Sep 27, 2024 by Pulumi

openstack.identity.getGroup

Explore with Pulumi AI

OpenStack v5.0.0 published on Friday, Sep 27, 2024 by Pulumi

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

Note: You must have admin privileges in your OpenStack cloud to use this resource.

Example Usage

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

const admins = openstack.identity.getGroup({
    name: "admins",
});
Copy
import pulumi
import pulumi_openstack as openstack

admins = openstack.identity.get_group(name="admins")
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.GetGroup(ctx, &identity.GetGroupArgs{
			Name: "admins",
		}, 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 admins = OpenStack.Identity.GetGroup.Invoke(new()
    {
        Name = "admins",
    });

});
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.GetGroupArgs;
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 admins = IdentityFunctions.getGroup(GetGroupArgs.builder()
            .name("admins")
            .build());

    }
}
Copy
variables:
  admins:
    fn::invoke:
      Function: openstack:identity:getGroup
      Arguments:
        name: admins
Copy

Using getGroup

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 getGroup(args: GetGroupArgs, opts?: InvokeOptions): Promise<GetGroupResult>
function getGroupOutput(args: GetGroupOutputArgs, opts?: InvokeOptions): Output<GetGroupResult>
Copy
def get_group(domain_id: Optional[str] = None,
              name: Optional[str] = None,
              region: Optional[str] = None,
              opts: Optional[InvokeOptions] = None) -> GetGroupResult
def get_group_output(domain_id: Optional[pulumi.Input[str]] = None,
              name: Optional[pulumi.Input[str]] = None,
              region: Optional[pulumi.Input[str]] = None,
              opts: Optional[InvokeOptions] = None) -> Output[GetGroupResult]
Copy
func GetGroup(ctx *Context, args *GetGroupArgs, opts ...InvokeOption) (*GetGroupResult, error)
func GetGroupOutput(ctx *Context, args *GetGroupOutputArgs, opts ...InvokeOption) GetGroupResultOutput
Copy

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

public static class GetGroup 
{
    public static Task<GetGroupResult> InvokeAsync(GetGroupArgs args, InvokeOptions? opts = null)
    public static Output<GetGroupResult> Invoke(GetGroupInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetGroupResult> getGroup(GetGroupArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Copy
fn::invoke:
  function: openstack:identity/getGroup:getGroup
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Name This property is required. string
The name of the group.
DomainId string
The domain the group belongs to.
Region Changes to this property will trigger replacement. string
The region in which to obtain the V3 Keystone client. If omitted, the region argument of the provider is used.
Name This property is required. string
The name of the group.
DomainId string
The domain the group belongs to.
Region Changes to this property will trigger replacement. string
The region in which to obtain the V3 Keystone client. If omitted, the region argument of the provider is used.
name This property is required. String
The name of the group.
domainId String
The domain the group belongs to.
region Changes to this property will trigger replacement. String
The region in which to obtain the V3 Keystone client. If omitted, the region argument of the provider is used.
name This property is required. string
The name of the group.
domainId string
The domain the group belongs to.
region Changes to this property will trigger replacement. string
The region in which to obtain the V3 Keystone client. If omitted, the region argument of the provider is used.
name This property is required. str
The name of the group.
domain_id str
The domain the group belongs to.
region Changes to this property will trigger replacement. str
The region in which to obtain the V3 Keystone client. If omitted, the region argument of the provider is used.
name This property is required. String
The name of the group.
domainId String
The domain the group belongs to.
region Changes to this property will trigger replacement. String
The region in which to obtain the V3 Keystone client. If omitted, the region argument of the provider is used.

getGroup Result

The following output properties are available:

Description string
A description of the group.
DomainId string
See Argument Reference above.
Id string
The provider-assigned unique ID for this managed resource.
Name string
See Argument Reference above.
Region string
See Argument Reference above.
Description string
A description of the group.
DomainId string
See Argument Reference above.
Id string
The provider-assigned unique ID for this managed resource.
Name string
See Argument Reference above.
Region string
See Argument Reference above.
description String
A description of the group.
domainId String
See Argument Reference above.
id String
The provider-assigned unique ID for this managed resource.
name String
See Argument Reference above.
region String
See Argument Reference above.
description string
A description of the group.
domainId string
See Argument Reference above.
id string
The provider-assigned unique ID for this managed resource.
name string
See Argument Reference above.
region string
See Argument Reference above.
description str
A description of the group.
domain_id str
See Argument Reference above.
id str
The provider-assigned unique ID for this managed resource.
name str
See Argument Reference above.
region str
See Argument Reference above.
description String
A description of the group.
domainId String
See Argument Reference above.
id String
The provider-assigned unique ID for this managed resource.
name String
See Argument Reference above.
region 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.0 published on Friday, Sep 27, 2024 by Pulumi