github.getExternalGroups

Explore with Pulumi AI

Use this data source to retrieve external groups belonging to an organization.

Example Usage

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Github = Pulumi.Github;

return await Deployment.RunAsync(() => 
{
    var exampleExternalGroups = Github.GetExternalGroups.Invoke();

    var localGroups = exampleExternalGroups;

    return new Dictionary<string, object?>
    {
        ["groups"] = localGroups,
    };
});
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		exampleExternalGroups, err := github.GetExternalGroups(ctx, nil, nil)
		if err != nil {
			return err
		}
		localGroups := exampleExternalGroups
		ctx.Export("groups", localGroups)
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.github.GithubFunctions;
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 exampleExternalGroups = GithubFunctions.getExternalGroups();

        final var localGroups = exampleExternalGroups.applyValue(getExternalGroupsResult -> getExternalGroupsResult);

        ctx.export("groups", localGroups);
    }
}
import pulumi
import pulumi_github as github

example_external_groups = github.get_external_groups()
local_groups = example_external_groups
pulumi.export("groups", local_groups)
import * as pulumi from "@pulumi/pulumi";
import * as github from "@pulumi/github";

const exampleExternalGroups = github.getExternalGroups({});
const localGroups = exampleExternalGroups;
export const groups = localGroups;
variables:
  exampleExternalGroups:
    fn::invoke:
      Function: github:getExternalGroups
      Arguments: {}
  localGroups: ${exampleExternalGroups}
outputs:
  groups: ${localGroups}

Using getExternalGroups

function getExternalGroups(opts?: InvokeOptions): Promise<GetExternalGroupsResult>
def get_external_groups(opts: Optional[InvokeOptions] = None) -> GetExternalGroupsResult
func GetExternalGroups(ctx *Context, opts ...InvokeOption) (*GetExternalGroupsResult, error)

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

public static class GetExternalGroups 
{
    public static Task<GetExternalGroupsResult> InvokeAsync(InvokeOptions? opts = null)
}
public static CompletableFuture<GetExternalGroupsResult> getExternalGroups(InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: github:index/getExternalGroups:getExternalGroups
  arguments:
    # arguments dictionary

getExternalGroups Result

The following output properties are available:

ExternalGroups List<GetExternalGroupsExternalGroup>

an array of external groups belonging to the organization. Each group consists of the fields documented below.

Id string

The provider-assigned unique ID for this managed resource.

ExternalGroups []GetExternalGroupsExternalGroup

an array of external groups belonging to the organization. Each group consists of the fields documented below.

Id string

The provider-assigned unique ID for this managed resource.

externalGroups List<GetExternalGroupsExternalGroup>

an array of external groups belonging to the organization. Each group consists of the fields documented below.

id String

The provider-assigned unique ID for this managed resource.

externalGroups GetExternalGroupsExternalGroup[]

an array of external groups belonging to the organization. Each group consists of the fields documented below.

id string

The provider-assigned unique ID for this managed resource.

external_groups Sequence[GetExternalGroupsExternalGroup]

an array of external groups belonging to the organization. Each group consists of the fields documented below.

id str

The provider-assigned unique ID for this managed resource.

externalGroups List<Property Map>

an array of external groups belonging to the organization. Each group consists of the fields documented below.

id String

The provider-assigned unique ID for this managed resource.

Supporting Types

GetExternalGroupsExternalGroup

GroupId int

the ID of the group.

GroupName string

the name of the group.

UpdatedAt string

the date the group was last updated.

GroupId int

the ID of the group.

GroupName string

the name of the group.

UpdatedAt string

the date the group was last updated.

groupId Integer

the ID of the group.

groupName String

the name of the group.

updatedAt String

the date the group was last updated.

groupId number

the ID of the group.

groupName string

the name of the group.

updatedAt string

the date the group was last updated.

group_id int

the ID of the group.

group_name str

the name of the group.

updated_at str

the date the group was last updated.

groupId Number

the ID of the group.

groupName String

the name of the group.

updatedAt String

the date the group was last updated.

Package Details

Repository
GitHub pulumi/pulumi-github
License
Apache-2.0
Notes

This Pulumi package is based on the github Terraform Provider.