GitHub v6.7.2 published on Wednesday, Apr 30, 2025 by Pulumi
github.getExternalGroups
Explore with Pulumi AI
Use this data source to retrieve external groups belonging to an organization.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as github from "@pulumi/github";
const exampleExternalGroups = github.getExternalGroups({});
const localGroups = exampleExternalGroups;
export const 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)
package main
import (
	"github.com/pulumi/pulumi-github/sdk/v6/go/github"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		exampleExternalGroups, err := github.GetExternalGroups(ctx, map[string]interface{}{}, nil)
		if err != nil {
			return err
		}
		localGroups := exampleExternalGroups
		ctx.Export("groups", localGroups)
		return nil
	})
}
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 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(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference);
        final var localGroups = exampleExternalGroups;
        ctx.export("groups", localGroups);
    }
}
variables:
  exampleExternalGroups:
    fn::invoke:
      function: github:getExternalGroups
      arguments: {}
  localGroups: ${exampleExternalGroups}
outputs:
  groups: ${localGroups}
Using getExternalGroups
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 getExternalGroups(opts?: InvokeOptions): Promise<GetExternalGroupsResult>
function getExternalGroupsOutput(opts?: InvokeOptions): Output<GetExternalGroupsResult>def get_external_groups(opts: Optional[InvokeOptions] = None) -> GetExternalGroupsResult
def get_external_groups_output(opts: Optional[InvokeOptions] = None) -> Output[GetExternalGroupsResult]func GetExternalGroups(ctx *Context, opts ...InvokeOption) (*GetExternalGroupsResult, error)
func GetExternalGroupsOutput(ctx *Context, opts ...InvokeOption) GetExternalGroupsResultOutput> Note: This function is named GetExternalGroups in the Go SDK.
public static class GetExternalGroups 
{
    public static Task<GetExternalGroupsResult> InvokeAsync(InvokeOptions? opts = null)
    public static Output<GetExternalGroupsResult> Invoke(InvokeOptions? opts = null)
}public static CompletableFuture<GetExternalGroupsResult> getExternalGroups(InvokeOptions options)
public static Output<GetExternalGroupsResult> getExternalGroups(InvokeOptions options)
fn::invoke:
  function: github:index/getExternalGroups:getExternalGroups
  arguments:
    # arguments dictionarygetExternalGroups Result
The following output properties are available:
- ExternalGroups List<GetExternal Groups External Group> 
- 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 []GetExternal Groups External Group 
- 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<GetExternal Groups External Group> 
- 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 GetExternal Groups External Group[] 
- 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[GetExternal Groups External Group] 
- 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    
- 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.
Package Details
- Repository
- GitHub pulumi/pulumi-github
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the githubTerraform Provider.