Viewing docs for GitHub v6.12.1
published on Thursday, Feb 12, 2026 by Pulumi
published on Thursday, Feb 12, 2026 by Pulumi
Viewing docs for GitHub v6.12.1
published on Thursday, Feb 12, 2026 by Pulumi
published on Thursday, Feb 12, 2026 by Pulumi
Use this data source to retrieve information about environments for a repository.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as github from "@pulumi/github";
const example = github.getRepositoryEnvironments({
repository: "example-repository",
});
import pulumi
import pulumi_github as github
example = github.get_repository_environments(repository="example-repository")
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 {
_, err := github.GetRepositoryEnvironments(ctx, &github.GetRepositoryEnvironmentsArgs{
Repository: "example-repository",
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Github = Pulumi.Github;
return await Deployment.RunAsync(() =>
{
var example = Github.GetRepositoryEnvironments.Invoke(new()
{
Repository = "example-repository",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.github.GithubFunctions;
import com.pulumi.github.inputs.GetRepositoryEnvironmentsArgs;
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 example = GithubFunctions.getRepositoryEnvironments(GetRepositoryEnvironmentsArgs.builder()
.repository("example-repository")
.build());
}
}
variables:
example:
fn::invoke:
function: github:getRepositoryEnvironments
arguments:
repository: example-repository
Using getRepositoryEnvironments
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 getRepositoryEnvironments(args: GetRepositoryEnvironmentsArgs, opts?: InvokeOptions): Promise<GetRepositoryEnvironmentsResult>
function getRepositoryEnvironmentsOutput(args: GetRepositoryEnvironmentsOutputArgs, opts?: InvokeOptions): Output<GetRepositoryEnvironmentsResult>def get_repository_environments(repository: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetRepositoryEnvironmentsResult
def get_repository_environments_output(repository: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetRepositoryEnvironmentsResult]func GetRepositoryEnvironments(ctx *Context, args *GetRepositoryEnvironmentsArgs, opts ...InvokeOption) (*GetRepositoryEnvironmentsResult, error)
func GetRepositoryEnvironmentsOutput(ctx *Context, args *GetRepositoryEnvironmentsOutputArgs, opts ...InvokeOption) GetRepositoryEnvironmentsResultOutput> Note: This function is named GetRepositoryEnvironments in the Go SDK.
public static class GetRepositoryEnvironments
{
public static Task<GetRepositoryEnvironmentsResult> InvokeAsync(GetRepositoryEnvironmentsArgs args, InvokeOptions? opts = null)
public static Output<GetRepositoryEnvironmentsResult> Invoke(GetRepositoryEnvironmentsInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetRepositoryEnvironmentsResult> getRepositoryEnvironments(GetRepositoryEnvironmentsArgs args, InvokeOptions options)
public static Output<GetRepositoryEnvironmentsResult> getRepositoryEnvironments(GetRepositoryEnvironmentsArgs args, InvokeOptions options)
fn::invoke:
function: github:index/getRepositoryEnvironments:getRepositoryEnvironments
arguments:
# arguments dictionaryThe following arguments are supported:
- Repository string
- Name of the repository to retrieve the environments from.
- Repository string
- Name of the repository to retrieve the environments from.
- repository String
- Name of the repository to retrieve the environments from.
- repository string
- Name of the repository to retrieve the environments from.
- repository str
- Name of the repository to retrieve the environments from.
- repository String
- Name of the repository to retrieve the environments from.
getRepositoryEnvironments Result
The following output properties are available:
- Environments
List<Get
Repository Environments Environment> - The list of this repository's environments. Each element of
environmentshas the following attributes: - Id string
- The provider-assigned unique ID for this managed resource.
- Repository string
- Environments
[]Get
Repository Environments Environment - The list of this repository's environments. Each element of
environmentshas the following attributes: - Id string
- The provider-assigned unique ID for this managed resource.
- Repository string
- environments
List<Get
Repository Environments Environment> - The list of this repository's environments. Each element of
environmentshas the following attributes: - id String
- The provider-assigned unique ID for this managed resource.
- repository String
- environments
Get
Repository Environments Environment[] - The list of this repository's environments. Each element of
environmentshas the following attributes: - id string
- The provider-assigned unique ID for this managed resource.
- repository string
- environments
Sequence[Get
Repository Environments Environment] - The list of this repository's environments. Each element of
environmentshas the following attributes: - id str
- The provider-assigned unique ID for this managed resource.
- repository str
- environments List<Property Map>
- The list of this repository's environments. Each element of
environmentshas the following attributes: - id String
- The provider-assigned unique ID for this managed resource.
- repository String
Supporting Types
GetRepositoryEnvironmentsEnvironment
Package Details
- Repository
- GitHub pulumi/pulumi-github
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
githubTerraform Provider.
Viewing docs for GitHub v6.12.1
published on Thursday, Feb 12, 2026 by Pulumi
published on Thursday, Feb 12, 2026 by Pulumi
