1. Packages
  2. Github Provider
  3. API Docs
  4. RepositoryEnvironment
GitHub v6.7.0 published on Friday, Feb 28, 2025 by Pulumi

github.RepositoryEnvironment

Explore with Pulumi AI

This resource allows you to create and manage environments for a GitHub repository.

Example Usage

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

const current = github.getUser({
    username: "",
});
const example = new github.Repository("example", {
    name: "A Repository Project",
    description: "My awesome codebase",
});
const exampleRepositoryEnvironment = new github.RepositoryEnvironment("example", {
    environment: "example",
    repository: example.name,
    preventSelfReview: true,
    reviewers: [{
        users: [current.then(current => current.id)],
    }],
    deploymentBranchPolicy: {
        protectedBranches: true,
        customBranchPolicies: false,
    },
});
Copy
import pulumi
import pulumi_github as github

current = github.get_user(username="")
example = github.Repository("example",
    name="A Repository Project",
    description="My awesome codebase")
example_repository_environment = github.RepositoryEnvironment("example",
    environment="example",
    repository=example.name,
    prevent_self_review=True,
    reviewers=[{
        "users": [current.id],
    }],
    deployment_branch_policy={
        "protected_branches": True,
        "custom_branch_policies": False,
    })
Copy
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 {
		current, err := github.GetUser(ctx, &github.GetUserArgs{
			Username: "",
		}, nil)
		if err != nil {
			return err
		}
		example, err := github.NewRepository(ctx, "example", &github.RepositoryArgs{
			Name:        pulumi.String("A Repository Project"),
			Description: pulumi.String("My awesome codebase"),
		})
		if err != nil {
			return err
		}
		_, err = github.NewRepositoryEnvironment(ctx, "example", &github.RepositoryEnvironmentArgs{
			Environment:       pulumi.String("example"),
			Repository:        example.Name,
			PreventSelfReview: pulumi.Bool(true),
			Reviewers: github.RepositoryEnvironmentReviewerArray{
				&github.RepositoryEnvironmentReviewerArgs{
					Users: pulumi.IntArray{
						pulumi.String(current.Id),
					},
				},
			},
			DeploymentBranchPolicy: &github.RepositoryEnvironmentDeploymentBranchPolicyArgs{
				ProtectedBranches:    pulumi.Bool(true),
				CustomBranchPolicies: pulumi.Bool(false),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Github = Pulumi.Github;

return await Deployment.RunAsync(() => 
{
    var current = Github.GetUser.Invoke(new()
    {
        Username = "",
    });

    var example = new Github.Repository("example", new()
    {
        Name = "A Repository Project",
        Description = "My awesome codebase",
    });

    var exampleRepositoryEnvironment = new Github.RepositoryEnvironment("example", new()
    {
        Environment = "example",
        Repository = example.Name,
        PreventSelfReview = true,
        Reviewers = new[]
        {
            new Github.Inputs.RepositoryEnvironmentReviewerArgs
            {
                Users = new[]
                {
                    current.Apply(getUserResult => getUserResult.Id),
                },
            },
        },
        DeploymentBranchPolicy = new Github.Inputs.RepositoryEnvironmentDeploymentBranchPolicyArgs
        {
            ProtectedBranches = true,
            CustomBranchPolicies = false,
        },
    });

});
Copy
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.GetUserArgs;
import com.pulumi.github.Repository;
import com.pulumi.github.RepositoryArgs;
import com.pulumi.github.RepositoryEnvironment;
import com.pulumi.github.RepositoryEnvironmentArgs;
import com.pulumi.github.inputs.RepositoryEnvironmentReviewerArgs;
import com.pulumi.github.inputs.RepositoryEnvironmentDeploymentBranchPolicyArgs;
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 current = GithubFunctions.getUser(GetUserArgs.builder()
            .username("")
            .build());

        var example = new Repository("example", RepositoryArgs.builder()
            .name("A Repository Project")
            .description("My awesome codebase")
            .build());

        var exampleRepositoryEnvironment = new RepositoryEnvironment("exampleRepositoryEnvironment", RepositoryEnvironmentArgs.builder()
            .environment("example")
            .repository(example.name())
            .preventSelfReview(true)
            .reviewers(RepositoryEnvironmentReviewerArgs.builder()
                .users(current.applyValue(getUserResult -> getUserResult.id()))
                .build())
            .deploymentBranchPolicy(RepositoryEnvironmentDeploymentBranchPolicyArgs.builder()
                .protectedBranches(true)
                .customBranchPolicies(false)
                .build())
            .build());

    }
}
Copy
resources:
  example:
    type: github:Repository
    properties:
      name: A Repository Project
      description: My awesome codebase
  exampleRepositoryEnvironment:
    type: github:RepositoryEnvironment
    name: example
    properties:
      environment: example
      repository: ${example.name}
      preventSelfReview: true
      reviewers:
        - users:
            - ${current.id}
      deploymentBranchPolicy:
        protectedBranches: true
        customBranchPolicies: false
variables:
  current:
    fn::invoke:
      function: github:getUser
      arguments:
        username: ""
Copy

Create RepositoryEnvironment Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new RepositoryEnvironment(name: string, args: RepositoryEnvironmentArgs, opts?: CustomResourceOptions);
@overload
def RepositoryEnvironment(resource_name: str,
                          args: RepositoryEnvironmentArgs,
                          opts: Optional[ResourceOptions] = None)

@overload
def RepositoryEnvironment(resource_name: str,
                          opts: Optional[ResourceOptions] = None,
                          environment: Optional[str] = None,
                          repository: Optional[str] = None,
                          can_admins_bypass: Optional[bool] = None,
                          deployment_branch_policy: Optional[RepositoryEnvironmentDeploymentBranchPolicyArgs] = None,
                          prevent_self_review: Optional[bool] = None,
                          reviewers: Optional[Sequence[RepositoryEnvironmentReviewerArgs]] = None,
                          wait_timer: Optional[int] = None)
func NewRepositoryEnvironment(ctx *Context, name string, args RepositoryEnvironmentArgs, opts ...ResourceOption) (*RepositoryEnvironment, error)
public RepositoryEnvironment(string name, RepositoryEnvironmentArgs args, CustomResourceOptions? opts = null)
public RepositoryEnvironment(String name, RepositoryEnvironmentArgs args)
public RepositoryEnvironment(String name, RepositoryEnvironmentArgs args, CustomResourceOptions options)
type: github:RepositoryEnvironment
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. RepositoryEnvironmentArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. RepositoryEnvironmentArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. RepositoryEnvironmentArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. RepositoryEnvironmentArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. RepositoryEnvironmentArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var repositoryEnvironmentResource = new Github.RepositoryEnvironment("repositoryEnvironmentResource", new()
{
    Environment = "string",
    Repository = "string",
    CanAdminsBypass = false,
    DeploymentBranchPolicy = new Github.Inputs.RepositoryEnvironmentDeploymentBranchPolicyArgs
    {
        CustomBranchPolicies = false,
        ProtectedBranches = false,
    },
    PreventSelfReview = false,
    Reviewers = new[]
    {
        new Github.Inputs.RepositoryEnvironmentReviewerArgs
        {
            Teams = new[]
            {
                0,
            },
            Users = new[]
            {
                0,
            },
        },
    },
    WaitTimer = 0,
});
Copy
example, err := github.NewRepositoryEnvironment(ctx, "repositoryEnvironmentResource", &github.RepositoryEnvironmentArgs{
	Environment:     pulumi.String("string"),
	Repository:      pulumi.String("string"),
	CanAdminsBypass: pulumi.Bool(false),
	DeploymentBranchPolicy: &github.RepositoryEnvironmentDeploymentBranchPolicyArgs{
		CustomBranchPolicies: pulumi.Bool(false),
		ProtectedBranches:    pulumi.Bool(false),
	},
	PreventSelfReview: pulumi.Bool(false),
	Reviewers: github.RepositoryEnvironmentReviewerArray{
		&github.RepositoryEnvironmentReviewerArgs{
			Teams: pulumi.IntArray{
				pulumi.Int(0),
			},
			Users: pulumi.IntArray{
				pulumi.Int(0),
			},
		},
	},
	WaitTimer: pulumi.Int(0),
})
Copy
var repositoryEnvironmentResource = new RepositoryEnvironment("repositoryEnvironmentResource", RepositoryEnvironmentArgs.builder()
    .environment("string")
    .repository("string")
    .canAdminsBypass(false)
    .deploymentBranchPolicy(RepositoryEnvironmentDeploymentBranchPolicyArgs.builder()
        .customBranchPolicies(false)
        .protectedBranches(false)
        .build())
    .preventSelfReview(false)
    .reviewers(RepositoryEnvironmentReviewerArgs.builder()
        .teams(0)
        .users(0)
        .build())
    .waitTimer(0)
    .build());
Copy
repository_environment_resource = github.RepositoryEnvironment("repositoryEnvironmentResource",
    environment="string",
    repository="string",
    can_admins_bypass=False,
    deployment_branch_policy={
        "custom_branch_policies": False,
        "protected_branches": False,
    },
    prevent_self_review=False,
    reviewers=[{
        "teams": [0],
        "users": [0],
    }],
    wait_timer=0)
Copy
const repositoryEnvironmentResource = new github.RepositoryEnvironment("repositoryEnvironmentResource", {
    environment: "string",
    repository: "string",
    canAdminsBypass: false,
    deploymentBranchPolicy: {
        customBranchPolicies: false,
        protectedBranches: false,
    },
    preventSelfReview: false,
    reviewers: [{
        teams: [0],
        users: [0],
    }],
    waitTimer: 0,
});
Copy
type: github:RepositoryEnvironment
properties:
    canAdminsBypass: false
    deploymentBranchPolicy:
        customBranchPolicies: false
        protectedBranches: false
    environment: string
    preventSelfReview: false
    repository: string
    reviewers:
        - teams:
            - 0
          users:
            - 0
    waitTimer: 0
Copy

RepositoryEnvironment Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The RepositoryEnvironment resource accepts the following input properties:

Environment
This property is required.
Changes to this property will trigger replacement.
string
The name of the environment.
Repository
This property is required.
Changes to this property will trigger replacement.
string
The repository of the environment.
CanAdminsBypass bool
Can repository admins bypass the environment protections. Defaults to true.
DeploymentBranchPolicy RepositoryEnvironmentDeploymentBranchPolicy
The deployment branch policy configuration
PreventSelfReview bool
Whether or not a user who created the job is prevented from approving their own job. Defaults to false.
Reviewers List<RepositoryEnvironmentReviewer>
The environment reviewers configuration.
WaitTimer int
Amount of time to delay a job after the job is initially triggered.
Environment
This property is required.
Changes to this property will trigger replacement.
string
The name of the environment.
Repository
This property is required.
Changes to this property will trigger replacement.
string
The repository of the environment.
CanAdminsBypass bool
Can repository admins bypass the environment protections. Defaults to true.
DeploymentBranchPolicy RepositoryEnvironmentDeploymentBranchPolicyArgs
The deployment branch policy configuration
PreventSelfReview bool
Whether or not a user who created the job is prevented from approving their own job. Defaults to false.
Reviewers []RepositoryEnvironmentReviewerArgs
The environment reviewers configuration.
WaitTimer int
Amount of time to delay a job after the job is initially triggered.
environment
This property is required.
Changes to this property will trigger replacement.
String
The name of the environment.
repository
This property is required.
Changes to this property will trigger replacement.
String
The repository of the environment.
canAdminsBypass Boolean
Can repository admins bypass the environment protections. Defaults to true.
deploymentBranchPolicy RepositoryEnvironmentDeploymentBranchPolicy
The deployment branch policy configuration
preventSelfReview Boolean
Whether or not a user who created the job is prevented from approving their own job. Defaults to false.
reviewers List<RepositoryEnvironmentReviewer>
The environment reviewers configuration.
waitTimer Integer
Amount of time to delay a job after the job is initially triggered.
environment
This property is required.
Changes to this property will trigger replacement.
string
The name of the environment.
repository
This property is required.
Changes to this property will trigger replacement.
string
The repository of the environment.
canAdminsBypass boolean
Can repository admins bypass the environment protections. Defaults to true.
deploymentBranchPolicy RepositoryEnvironmentDeploymentBranchPolicy
The deployment branch policy configuration
preventSelfReview boolean
Whether or not a user who created the job is prevented from approving their own job. Defaults to false.
reviewers RepositoryEnvironmentReviewer[]
The environment reviewers configuration.
waitTimer number
Amount of time to delay a job after the job is initially triggered.
environment
This property is required.
Changes to this property will trigger replacement.
str
The name of the environment.
repository
This property is required.
Changes to this property will trigger replacement.
str
The repository of the environment.
can_admins_bypass bool
Can repository admins bypass the environment protections. Defaults to true.
deployment_branch_policy RepositoryEnvironmentDeploymentBranchPolicyArgs
The deployment branch policy configuration
prevent_self_review bool
Whether or not a user who created the job is prevented from approving their own job. Defaults to false.
reviewers Sequence[RepositoryEnvironmentReviewerArgs]
The environment reviewers configuration.
wait_timer int
Amount of time to delay a job after the job is initially triggered.
environment
This property is required.
Changes to this property will trigger replacement.
String
The name of the environment.
repository
This property is required.
Changes to this property will trigger replacement.
String
The repository of the environment.
canAdminsBypass Boolean
Can repository admins bypass the environment protections. Defaults to true.
deploymentBranchPolicy Property Map
The deployment branch policy configuration
preventSelfReview Boolean
Whether or not a user who created the job is prevented from approving their own job. Defaults to false.
reviewers List<Property Map>
The environment reviewers configuration.
waitTimer Number
Amount of time to delay a job after the job is initially triggered.

Outputs

All input properties are implicitly available as output properties. Additionally, the RepositoryEnvironment resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.

Look up Existing RepositoryEnvironment Resource

Get an existing RepositoryEnvironment resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: RepositoryEnvironmentState, opts?: CustomResourceOptions): RepositoryEnvironment
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        can_admins_bypass: Optional[bool] = None,
        deployment_branch_policy: Optional[RepositoryEnvironmentDeploymentBranchPolicyArgs] = None,
        environment: Optional[str] = None,
        prevent_self_review: Optional[bool] = None,
        repository: Optional[str] = None,
        reviewers: Optional[Sequence[RepositoryEnvironmentReviewerArgs]] = None,
        wait_timer: Optional[int] = None) -> RepositoryEnvironment
func GetRepositoryEnvironment(ctx *Context, name string, id IDInput, state *RepositoryEnvironmentState, opts ...ResourceOption) (*RepositoryEnvironment, error)
public static RepositoryEnvironment Get(string name, Input<string> id, RepositoryEnvironmentState? state, CustomResourceOptions? opts = null)
public static RepositoryEnvironment get(String name, Output<String> id, RepositoryEnvironmentState state, CustomResourceOptions options)
resources:  _:    type: github:RepositoryEnvironment    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
CanAdminsBypass bool
Can repository admins bypass the environment protections. Defaults to true.
DeploymentBranchPolicy RepositoryEnvironmentDeploymentBranchPolicy
The deployment branch policy configuration
Environment Changes to this property will trigger replacement. string
The name of the environment.
PreventSelfReview bool
Whether or not a user who created the job is prevented from approving their own job. Defaults to false.
Repository Changes to this property will trigger replacement. string
The repository of the environment.
Reviewers List<RepositoryEnvironmentReviewer>
The environment reviewers configuration.
WaitTimer int
Amount of time to delay a job after the job is initially triggered.
CanAdminsBypass bool
Can repository admins bypass the environment protections. Defaults to true.
DeploymentBranchPolicy RepositoryEnvironmentDeploymentBranchPolicyArgs
The deployment branch policy configuration
Environment Changes to this property will trigger replacement. string
The name of the environment.
PreventSelfReview bool
Whether or not a user who created the job is prevented from approving their own job. Defaults to false.
Repository Changes to this property will trigger replacement. string
The repository of the environment.
Reviewers []RepositoryEnvironmentReviewerArgs
The environment reviewers configuration.
WaitTimer int
Amount of time to delay a job after the job is initially triggered.
canAdminsBypass Boolean
Can repository admins bypass the environment protections. Defaults to true.
deploymentBranchPolicy RepositoryEnvironmentDeploymentBranchPolicy
The deployment branch policy configuration
environment Changes to this property will trigger replacement. String
The name of the environment.
preventSelfReview Boolean
Whether or not a user who created the job is prevented from approving their own job. Defaults to false.
repository Changes to this property will trigger replacement. String
The repository of the environment.
reviewers List<RepositoryEnvironmentReviewer>
The environment reviewers configuration.
waitTimer Integer
Amount of time to delay a job after the job is initially triggered.
canAdminsBypass boolean
Can repository admins bypass the environment protections. Defaults to true.
deploymentBranchPolicy RepositoryEnvironmentDeploymentBranchPolicy
The deployment branch policy configuration
environment Changes to this property will trigger replacement. string
The name of the environment.
preventSelfReview boolean
Whether or not a user who created the job is prevented from approving their own job. Defaults to false.
repository Changes to this property will trigger replacement. string
The repository of the environment.
reviewers RepositoryEnvironmentReviewer[]
The environment reviewers configuration.
waitTimer number
Amount of time to delay a job after the job is initially triggered.
can_admins_bypass bool
Can repository admins bypass the environment protections. Defaults to true.
deployment_branch_policy RepositoryEnvironmentDeploymentBranchPolicyArgs
The deployment branch policy configuration
environment Changes to this property will trigger replacement. str
The name of the environment.
prevent_self_review bool
Whether or not a user who created the job is prevented from approving their own job. Defaults to false.
repository Changes to this property will trigger replacement. str
The repository of the environment.
reviewers Sequence[RepositoryEnvironmentReviewerArgs]
The environment reviewers configuration.
wait_timer int
Amount of time to delay a job after the job is initially triggered.
canAdminsBypass Boolean
Can repository admins bypass the environment protections. Defaults to true.
deploymentBranchPolicy Property Map
The deployment branch policy configuration
environment Changes to this property will trigger replacement. String
The name of the environment.
preventSelfReview Boolean
Whether or not a user who created the job is prevented from approving their own job. Defaults to false.
repository Changes to this property will trigger replacement. String
The repository of the environment.
reviewers List<Property Map>
The environment reviewers configuration.
waitTimer Number
Amount of time to delay a job after the job is initially triggered.

Supporting Types

RepositoryEnvironmentDeploymentBranchPolicy
, RepositoryEnvironmentDeploymentBranchPolicyArgs

CustomBranchPolicies This property is required. bool
Whether only branches that match the specified name patterns can deploy to this environment.
ProtectedBranches This property is required. bool
Whether only branches with branch protection rules can deploy to this environment.
CustomBranchPolicies This property is required. bool
Whether only branches that match the specified name patterns can deploy to this environment.
ProtectedBranches This property is required. bool
Whether only branches with branch protection rules can deploy to this environment.
customBranchPolicies This property is required. Boolean
Whether only branches that match the specified name patterns can deploy to this environment.
protectedBranches This property is required. Boolean
Whether only branches with branch protection rules can deploy to this environment.
customBranchPolicies This property is required. boolean
Whether only branches that match the specified name patterns can deploy to this environment.
protectedBranches This property is required. boolean
Whether only branches with branch protection rules can deploy to this environment.
custom_branch_policies This property is required. bool
Whether only branches that match the specified name patterns can deploy to this environment.
protected_branches This property is required. bool
Whether only branches with branch protection rules can deploy to this environment.
customBranchPolicies This property is required. Boolean
Whether only branches that match the specified name patterns can deploy to this environment.
protectedBranches This property is required. Boolean
Whether only branches with branch protection rules can deploy to this environment.

RepositoryEnvironmentReviewer
, RepositoryEnvironmentReviewerArgs

Teams List<int>
Up to 6 IDs for teams who may review jobs that reference the environment. Reviewers must have at least read access to the repository. Only one of the required reviewers needs to approve the job for it to proceed.
Users List<int>
Up to 6 IDs for users who may review jobs that reference the environment. Reviewers must have at least read access to the repository. Only one of the required reviewers needs to approve the job for it to proceed.
Teams []int
Up to 6 IDs for teams who may review jobs that reference the environment. Reviewers must have at least read access to the repository. Only one of the required reviewers needs to approve the job for it to proceed.
Users []int
Up to 6 IDs for users who may review jobs that reference the environment. Reviewers must have at least read access to the repository. Only one of the required reviewers needs to approve the job for it to proceed.
teams List<Integer>
Up to 6 IDs for teams who may review jobs that reference the environment. Reviewers must have at least read access to the repository. Only one of the required reviewers needs to approve the job for it to proceed.
users List<Integer>
Up to 6 IDs for users who may review jobs that reference the environment. Reviewers must have at least read access to the repository. Only one of the required reviewers needs to approve the job for it to proceed.
teams number[]
Up to 6 IDs for teams who may review jobs that reference the environment. Reviewers must have at least read access to the repository. Only one of the required reviewers needs to approve the job for it to proceed.
users number[]
Up to 6 IDs for users who may review jobs that reference the environment. Reviewers must have at least read access to the repository. Only one of the required reviewers needs to approve the job for it to proceed.
teams Sequence[int]
Up to 6 IDs for teams who may review jobs that reference the environment. Reviewers must have at least read access to the repository. Only one of the required reviewers needs to approve the job for it to proceed.
users Sequence[int]
Up to 6 IDs for users who may review jobs that reference the environment. Reviewers must have at least read access to the repository. Only one of the required reviewers needs to approve the job for it to proceed.
teams List<Number>
Up to 6 IDs for teams who may review jobs that reference the environment. Reviewers must have at least read access to the repository. Only one of the required reviewers needs to approve the job for it to proceed.
users List<Number>
Up to 6 IDs for users who may review jobs that reference the environment. Reviewers must have at least read access to the repository. Only one of the required reviewers needs to approve the job for it to proceed.

Import

GitHub Repository Environment can be imported using an ID made up of name of the repository combined with the environment name of the environment, separated by a : character, e.g.

$ pulumi import github:index/repositoryEnvironment:RepositoryEnvironment daily terraform:daily
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
GitHub pulumi/pulumi-github
License
Apache-2.0
Notes
This Pulumi package is based on the github Terraform Provider.