1. Packages
  2. Gitlab Provider
  3. API Docs
  4. GroupProtectedEnvironment
GitLab v8.10.0 published on Friday, Mar 21, 2025 by Pulumi

gitlab.GroupProtectedEnvironment

Explore with Pulumi AI

The gitlab.GroupProtectedEnvironment resource allows to manage the lifecycle of a protected environment in a group.

In order to use a user_id in the deploy_access_levels configuration, you need to make sure that users have access to the group with Maintainer role or higher. In order to use a group_id in the deploy_access_levels configuration, the group_id must be a sub-group under the given group.

Upstream API: GitLab REST API docs

Create GroupProtectedEnvironment Resource

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

Constructor syntax

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

@overload
def GroupProtectedEnvironment(resource_name: str,
                              opts: Optional[ResourceOptions] = None,
                              deploy_access_levels: Optional[Sequence[GroupProtectedEnvironmentDeployAccessLevelArgs]] = None,
                              environment: Optional[str] = None,
                              group: Optional[str] = None,
                              approval_rules: Optional[Sequence[GroupProtectedEnvironmentApprovalRuleArgs]] = None)
func NewGroupProtectedEnvironment(ctx *Context, name string, args GroupProtectedEnvironmentArgs, opts ...ResourceOption) (*GroupProtectedEnvironment, error)
public GroupProtectedEnvironment(string name, GroupProtectedEnvironmentArgs args, CustomResourceOptions? opts = null)
public GroupProtectedEnvironment(String name, GroupProtectedEnvironmentArgs args)
public GroupProtectedEnvironment(String name, GroupProtectedEnvironmentArgs args, CustomResourceOptions options)
type: gitlab:GroupProtectedEnvironment
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. GroupProtectedEnvironmentArgs
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. GroupProtectedEnvironmentArgs
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. GroupProtectedEnvironmentArgs
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. GroupProtectedEnvironmentArgs
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. GroupProtectedEnvironmentArgs
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 groupProtectedEnvironmentResource = new GitLab.GroupProtectedEnvironment("groupProtectedEnvironmentResource", new()
{
    DeployAccessLevels = new[]
    {
        new GitLab.Inputs.GroupProtectedEnvironmentDeployAccessLevelArgs
        {
            AccessLevel = "string",
            AccessLevelDescription = "string",
            GroupId = 0,
            GroupInheritanceType = 0,
            Id = 0,
            UserId = 0,
        },
    },
    Environment = "string",
    Group = "string",
    ApprovalRules = new[]
    {
        new GitLab.Inputs.GroupProtectedEnvironmentApprovalRuleArgs
        {
            AccessLevel = "string",
            AccessLevelDescription = "string",
            GroupId = 0,
            GroupInheritanceType = 0,
            Id = 0,
            RequiredApprovals = 0,
            UserId = 0,
        },
    },
});
Copy
example, err := gitlab.NewGroupProtectedEnvironment(ctx, "groupProtectedEnvironmentResource", &gitlab.GroupProtectedEnvironmentArgs{
	DeployAccessLevels: gitlab.GroupProtectedEnvironmentDeployAccessLevelArray{
		&gitlab.GroupProtectedEnvironmentDeployAccessLevelArgs{
			AccessLevel:            pulumi.String("string"),
			AccessLevelDescription: pulumi.String("string"),
			GroupId:                pulumi.Int(0),
			GroupInheritanceType:   pulumi.Int(0),
			Id:                     pulumi.Int(0),
			UserId:                 pulumi.Int(0),
		},
	},
	Environment: pulumi.String("string"),
	Group:       pulumi.String("string"),
	ApprovalRules: gitlab.GroupProtectedEnvironmentApprovalRuleArray{
		&gitlab.GroupProtectedEnvironmentApprovalRuleArgs{
			AccessLevel:            pulumi.String("string"),
			AccessLevelDescription: pulumi.String("string"),
			GroupId:                pulumi.Int(0),
			GroupInheritanceType:   pulumi.Int(0),
			Id:                     pulumi.Int(0),
			RequiredApprovals:      pulumi.Int(0),
			UserId:                 pulumi.Int(0),
		},
	},
})
Copy
var groupProtectedEnvironmentResource = new GroupProtectedEnvironment("groupProtectedEnvironmentResource", GroupProtectedEnvironmentArgs.builder()
    .deployAccessLevels(GroupProtectedEnvironmentDeployAccessLevelArgs.builder()
        .accessLevel("string")
        .accessLevelDescription("string")
        .groupId(0)
        .groupInheritanceType(0)
        .id(0)
        .userId(0)
        .build())
    .environment("string")
    .group("string")
    .approvalRules(GroupProtectedEnvironmentApprovalRuleArgs.builder()
        .accessLevel("string")
        .accessLevelDescription("string")
        .groupId(0)
        .groupInheritanceType(0)
        .id(0)
        .requiredApprovals(0)
        .userId(0)
        .build())
    .build());
Copy
group_protected_environment_resource = gitlab.GroupProtectedEnvironment("groupProtectedEnvironmentResource",
    deploy_access_levels=[{
        "access_level": "string",
        "access_level_description": "string",
        "group_id": 0,
        "group_inheritance_type": 0,
        "id": 0,
        "user_id": 0,
    }],
    environment="string",
    group="string",
    approval_rules=[{
        "access_level": "string",
        "access_level_description": "string",
        "group_id": 0,
        "group_inheritance_type": 0,
        "id": 0,
        "required_approvals": 0,
        "user_id": 0,
    }])
Copy
const groupProtectedEnvironmentResource = new gitlab.GroupProtectedEnvironment("groupProtectedEnvironmentResource", {
    deployAccessLevels: [{
        accessLevel: "string",
        accessLevelDescription: "string",
        groupId: 0,
        groupInheritanceType: 0,
        id: 0,
        userId: 0,
    }],
    environment: "string",
    group: "string",
    approvalRules: [{
        accessLevel: "string",
        accessLevelDescription: "string",
        groupId: 0,
        groupInheritanceType: 0,
        id: 0,
        requiredApprovals: 0,
        userId: 0,
    }],
});
Copy
type: gitlab:GroupProtectedEnvironment
properties:
    approvalRules:
        - accessLevel: string
          accessLevelDescription: string
          groupId: 0
          groupInheritanceType: 0
          id: 0
          requiredApprovals: 0
          userId: 0
    deployAccessLevels:
        - accessLevel: string
          accessLevelDescription: string
          groupId: 0
          groupInheritanceType: 0
          id: 0
          userId: 0
    environment: string
    group: string
Copy

GroupProtectedEnvironment 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 GroupProtectedEnvironment resource accepts the following input properties:

DeployAccessLevels This property is required. List<Pulumi.GitLab.Inputs.GroupProtectedEnvironmentDeployAccessLevel>
Array of access levels allowed to deploy, with each described by a hash. Elements in the deploy_access_levels should be one of user_id, group_id or access_level.
Environment This property is required. string
The deployment tier of the environment. Valid values are production, staging, testing, development, other.
Group This property is required. string
The ID or full path of the group which the protected environment is created against.
ApprovalRules List<Pulumi.GitLab.Inputs.GroupProtectedEnvironmentApprovalRule>
Array of approval rules to deploy, with each described by a hash. Elements in the approval_rules should be one of user_id, group_id or access_level.
DeployAccessLevels This property is required. []GroupProtectedEnvironmentDeployAccessLevelArgs
Array of access levels allowed to deploy, with each described by a hash. Elements in the deploy_access_levels should be one of user_id, group_id or access_level.
Environment This property is required. string
The deployment tier of the environment. Valid values are production, staging, testing, development, other.
Group This property is required. string
The ID or full path of the group which the protected environment is created against.
ApprovalRules []GroupProtectedEnvironmentApprovalRuleArgs
Array of approval rules to deploy, with each described by a hash. Elements in the approval_rules should be one of user_id, group_id or access_level.
deployAccessLevels This property is required. List<GroupProtectedEnvironmentDeployAccessLevel>
Array of access levels allowed to deploy, with each described by a hash. Elements in the deploy_access_levels should be one of user_id, group_id or access_level.
environment This property is required. String
The deployment tier of the environment. Valid values are production, staging, testing, development, other.
group This property is required. String
The ID or full path of the group which the protected environment is created against.
approvalRules List<GroupProtectedEnvironmentApprovalRule>
Array of approval rules to deploy, with each described by a hash. Elements in the approval_rules should be one of user_id, group_id or access_level.
deployAccessLevels This property is required. GroupProtectedEnvironmentDeployAccessLevel[]
Array of access levels allowed to deploy, with each described by a hash. Elements in the deploy_access_levels should be one of user_id, group_id or access_level.
environment This property is required. string
The deployment tier of the environment. Valid values are production, staging, testing, development, other.
group This property is required. string
The ID or full path of the group which the protected environment is created against.
approvalRules GroupProtectedEnvironmentApprovalRule[]
Array of approval rules to deploy, with each described by a hash. Elements in the approval_rules should be one of user_id, group_id or access_level.
deploy_access_levels This property is required. Sequence[GroupProtectedEnvironmentDeployAccessLevelArgs]
Array of access levels allowed to deploy, with each described by a hash. Elements in the deploy_access_levels should be one of user_id, group_id or access_level.
environment This property is required. str
The deployment tier of the environment. Valid values are production, staging, testing, development, other.
group This property is required. str
The ID or full path of the group which the protected environment is created against.
approval_rules Sequence[GroupProtectedEnvironmentApprovalRuleArgs]
Array of approval rules to deploy, with each described by a hash. Elements in the approval_rules should be one of user_id, group_id or access_level.
deployAccessLevels This property is required. List<Property Map>
Array of access levels allowed to deploy, with each described by a hash. Elements in the deploy_access_levels should be one of user_id, group_id or access_level.
environment This property is required. String
The deployment tier of the environment. Valid values are production, staging, testing, development, other.
group This property is required. String
The ID or full path of the group which the protected environment is created against.
approvalRules List<Property Map>
Array of approval rules to deploy, with each described by a hash. Elements in the approval_rules should be one of user_id, group_id or access_level.

Outputs

All input properties are implicitly available as output properties. Additionally, the GroupProtectedEnvironment 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 GroupProtectedEnvironment Resource

Get an existing GroupProtectedEnvironment 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?: GroupProtectedEnvironmentState, opts?: CustomResourceOptions): GroupProtectedEnvironment
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        approval_rules: Optional[Sequence[GroupProtectedEnvironmentApprovalRuleArgs]] = None,
        deploy_access_levels: Optional[Sequence[GroupProtectedEnvironmentDeployAccessLevelArgs]] = None,
        environment: Optional[str] = None,
        group: Optional[str] = None) -> GroupProtectedEnvironment
func GetGroupProtectedEnvironment(ctx *Context, name string, id IDInput, state *GroupProtectedEnvironmentState, opts ...ResourceOption) (*GroupProtectedEnvironment, error)
public static GroupProtectedEnvironment Get(string name, Input<string> id, GroupProtectedEnvironmentState? state, CustomResourceOptions? opts = null)
public static GroupProtectedEnvironment get(String name, Output<String> id, GroupProtectedEnvironmentState state, CustomResourceOptions options)
resources:  _:    type: gitlab:GroupProtectedEnvironment    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:
ApprovalRules List<Pulumi.GitLab.Inputs.GroupProtectedEnvironmentApprovalRule>
Array of approval rules to deploy, with each described by a hash. Elements in the approval_rules should be one of user_id, group_id or access_level.
DeployAccessLevels List<Pulumi.GitLab.Inputs.GroupProtectedEnvironmentDeployAccessLevel>
Array of access levels allowed to deploy, with each described by a hash. Elements in the deploy_access_levels should be one of user_id, group_id or access_level.
Environment string
The deployment tier of the environment. Valid values are production, staging, testing, development, other.
Group string
The ID or full path of the group which the protected environment is created against.
ApprovalRules []GroupProtectedEnvironmentApprovalRuleArgs
Array of approval rules to deploy, with each described by a hash. Elements in the approval_rules should be one of user_id, group_id or access_level.
DeployAccessLevels []GroupProtectedEnvironmentDeployAccessLevelArgs
Array of access levels allowed to deploy, with each described by a hash. Elements in the deploy_access_levels should be one of user_id, group_id or access_level.
Environment string
The deployment tier of the environment. Valid values are production, staging, testing, development, other.
Group string
The ID or full path of the group which the protected environment is created against.
approvalRules List<GroupProtectedEnvironmentApprovalRule>
Array of approval rules to deploy, with each described by a hash. Elements in the approval_rules should be one of user_id, group_id or access_level.
deployAccessLevels List<GroupProtectedEnvironmentDeployAccessLevel>
Array of access levels allowed to deploy, with each described by a hash. Elements in the deploy_access_levels should be one of user_id, group_id or access_level.
environment String
The deployment tier of the environment. Valid values are production, staging, testing, development, other.
group String
The ID or full path of the group which the protected environment is created against.
approvalRules GroupProtectedEnvironmentApprovalRule[]
Array of approval rules to deploy, with each described by a hash. Elements in the approval_rules should be one of user_id, group_id or access_level.
deployAccessLevels GroupProtectedEnvironmentDeployAccessLevel[]
Array of access levels allowed to deploy, with each described by a hash. Elements in the deploy_access_levels should be one of user_id, group_id or access_level.
environment string
The deployment tier of the environment. Valid values are production, staging, testing, development, other.
group string
The ID or full path of the group which the protected environment is created against.
approval_rules Sequence[GroupProtectedEnvironmentApprovalRuleArgs]
Array of approval rules to deploy, with each described by a hash. Elements in the approval_rules should be one of user_id, group_id or access_level.
deploy_access_levels Sequence[GroupProtectedEnvironmentDeployAccessLevelArgs]
Array of access levels allowed to deploy, with each described by a hash. Elements in the deploy_access_levels should be one of user_id, group_id or access_level.
environment str
The deployment tier of the environment. Valid values are production, staging, testing, development, other.
group str
The ID or full path of the group which the protected environment is created against.
approvalRules List<Property Map>
Array of approval rules to deploy, with each described by a hash. Elements in the approval_rules should be one of user_id, group_id or access_level.
deployAccessLevels List<Property Map>
Array of access levels allowed to deploy, with each described by a hash. Elements in the deploy_access_levels should be one of user_id, group_id or access_level.
environment String
The deployment tier of the environment. Valid values are production, staging, testing, development, other.
group String
The ID or full path of the group which the protected environment is created against.

Supporting Types

GroupProtectedEnvironmentApprovalRule
, GroupProtectedEnvironmentApprovalRuleArgs

AccessLevel string
Levels of access allowed to approve a deployment to this protected environment. Mutually exclusive with user_id and group_id. Valid values are developer, maintainer.
AccessLevelDescription string
Readable description of level of access.
GroupId int
The ID of the group allowed to approve a deployment to this protected environment. TThe group must be a sub-group under the given group. Mutually exclusive with access_level and user_id.
GroupInheritanceType int
Group inheritance allows access rules to take inherited group membership into account. Valid values are 0, 1. 0 => Direct group membership only, 1 => All inherited groups. Default: 0
Id int
The unique ID of the Approval Rules object.
RequiredApprovals int
The number of approval required to allow deployment to this protected environment. This is mutually exclusive with user_id.
UserId int
The ID of the user allowed to approve a deployment to this protected environment. The user must be a member of the group with Maintainer role or higher. Mutually exclusive with access_level and group_id.
AccessLevel string
Levels of access allowed to approve a deployment to this protected environment. Mutually exclusive with user_id and group_id. Valid values are developer, maintainer.
AccessLevelDescription string
Readable description of level of access.
GroupId int
The ID of the group allowed to approve a deployment to this protected environment. TThe group must be a sub-group under the given group. Mutually exclusive with access_level and user_id.
GroupInheritanceType int
Group inheritance allows access rules to take inherited group membership into account. Valid values are 0, 1. 0 => Direct group membership only, 1 => All inherited groups. Default: 0
Id int
The unique ID of the Approval Rules object.
RequiredApprovals int
The number of approval required to allow deployment to this protected environment. This is mutually exclusive with user_id.
UserId int
The ID of the user allowed to approve a deployment to this protected environment. The user must be a member of the group with Maintainer role or higher. Mutually exclusive with access_level and group_id.
accessLevel String
Levels of access allowed to approve a deployment to this protected environment. Mutually exclusive with user_id and group_id. Valid values are developer, maintainer.
accessLevelDescription String
Readable description of level of access.
groupId Integer
The ID of the group allowed to approve a deployment to this protected environment. TThe group must be a sub-group under the given group. Mutually exclusive with access_level and user_id.
groupInheritanceType Integer
Group inheritance allows access rules to take inherited group membership into account. Valid values are 0, 1. 0 => Direct group membership only, 1 => All inherited groups. Default: 0
id Integer
The unique ID of the Approval Rules object.
requiredApprovals Integer
The number of approval required to allow deployment to this protected environment. This is mutually exclusive with user_id.
userId Integer
The ID of the user allowed to approve a deployment to this protected environment. The user must be a member of the group with Maintainer role or higher. Mutually exclusive with access_level and group_id.
accessLevel string
Levels of access allowed to approve a deployment to this protected environment. Mutually exclusive with user_id and group_id. Valid values are developer, maintainer.
accessLevelDescription string
Readable description of level of access.
groupId number
The ID of the group allowed to approve a deployment to this protected environment. TThe group must be a sub-group under the given group. Mutually exclusive with access_level and user_id.
groupInheritanceType number
Group inheritance allows access rules to take inherited group membership into account. Valid values are 0, 1. 0 => Direct group membership only, 1 => All inherited groups. Default: 0
id number
The unique ID of the Approval Rules object.
requiredApprovals number
The number of approval required to allow deployment to this protected environment. This is mutually exclusive with user_id.
userId number
The ID of the user allowed to approve a deployment to this protected environment. The user must be a member of the group with Maintainer role or higher. Mutually exclusive with access_level and group_id.
access_level str
Levels of access allowed to approve a deployment to this protected environment. Mutually exclusive with user_id and group_id. Valid values are developer, maintainer.
access_level_description str
Readable description of level of access.
group_id int
The ID of the group allowed to approve a deployment to this protected environment. TThe group must be a sub-group under the given group. Mutually exclusive with access_level and user_id.
group_inheritance_type int
Group inheritance allows access rules to take inherited group membership into account. Valid values are 0, 1. 0 => Direct group membership only, 1 => All inherited groups. Default: 0
id int
The unique ID of the Approval Rules object.
required_approvals int
The number of approval required to allow deployment to this protected environment. This is mutually exclusive with user_id.
user_id int
The ID of the user allowed to approve a deployment to this protected environment. The user must be a member of the group with Maintainer role or higher. Mutually exclusive with access_level and group_id.
accessLevel String
Levels of access allowed to approve a deployment to this protected environment. Mutually exclusive with user_id and group_id. Valid values are developer, maintainer.
accessLevelDescription String
Readable description of level of access.
groupId Number
The ID of the group allowed to approve a deployment to this protected environment. TThe group must be a sub-group under the given group. Mutually exclusive with access_level and user_id.
groupInheritanceType Number
Group inheritance allows access rules to take inherited group membership into account. Valid values are 0, 1. 0 => Direct group membership only, 1 => All inherited groups. Default: 0
id Number
The unique ID of the Approval Rules object.
requiredApprovals Number
The number of approval required to allow deployment to this protected environment. This is mutually exclusive with user_id.
userId Number
The ID of the user allowed to approve a deployment to this protected environment. The user must be a member of the group with Maintainer role or higher. Mutually exclusive with access_level and group_id.

GroupProtectedEnvironmentDeployAccessLevel
, GroupProtectedEnvironmentDeployAccessLevelArgs

AccessLevel string
Levels of access required to deploy to this protected environment. Mutually exclusive with user_id and group_id. Valid values are developer, maintainer.
AccessLevelDescription string
Readable description of level of access.
GroupId int
The ID of the group allowed to deploy to this protected environment. The group must be a sub-group under the given group. Mutually exclusive with access_level and user_id.
GroupInheritanceType int
Group inheritance allows deploy access levels to take inherited group membership into account. Valid values are 0, 1. 0 => Direct group membership only, 1 => All inherited groups. Default: 0
Id int
The unique ID of the Deploy Access Level object.
UserId int
The ID of the user allowed to deploy to this protected environment. The user must be a member of the group with Maintainer role or higher. Mutually exclusive with access_level and group_id.
AccessLevel string
Levels of access required to deploy to this protected environment. Mutually exclusive with user_id and group_id. Valid values are developer, maintainer.
AccessLevelDescription string
Readable description of level of access.
GroupId int
The ID of the group allowed to deploy to this protected environment. The group must be a sub-group under the given group. Mutually exclusive with access_level and user_id.
GroupInheritanceType int
Group inheritance allows deploy access levels to take inherited group membership into account. Valid values are 0, 1. 0 => Direct group membership only, 1 => All inherited groups. Default: 0
Id int
The unique ID of the Deploy Access Level object.
UserId int
The ID of the user allowed to deploy to this protected environment. The user must be a member of the group with Maintainer role or higher. Mutually exclusive with access_level and group_id.
accessLevel String
Levels of access required to deploy to this protected environment. Mutually exclusive with user_id and group_id. Valid values are developer, maintainer.
accessLevelDescription String
Readable description of level of access.
groupId Integer
The ID of the group allowed to deploy to this protected environment. The group must be a sub-group under the given group. Mutually exclusive with access_level and user_id.
groupInheritanceType Integer
Group inheritance allows deploy access levels to take inherited group membership into account. Valid values are 0, 1. 0 => Direct group membership only, 1 => All inherited groups. Default: 0
id Integer
The unique ID of the Deploy Access Level object.
userId Integer
The ID of the user allowed to deploy to this protected environment. The user must be a member of the group with Maintainer role or higher. Mutually exclusive with access_level and group_id.
accessLevel string
Levels of access required to deploy to this protected environment. Mutually exclusive with user_id and group_id. Valid values are developer, maintainer.
accessLevelDescription string
Readable description of level of access.
groupId number
The ID of the group allowed to deploy to this protected environment. The group must be a sub-group under the given group. Mutually exclusive with access_level and user_id.
groupInheritanceType number
Group inheritance allows deploy access levels to take inherited group membership into account. Valid values are 0, 1. 0 => Direct group membership only, 1 => All inherited groups. Default: 0
id number
The unique ID of the Deploy Access Level object.
userId number
The ID of the user allowed to deploy to this protected environment. The user must be a member of the group with Maintainer role or higher. Mutually exclusive with access_level and group_id.
access_level str
Levels of access required to deploy to this protected environment. Mutually exclusive with user_id and group_id. Valid values are developer, maintainer.
access_level_description str
Readable description of level of access.
group_id int
The ID of the group allowed to deploy to this protected environment. The group must be a sub-group under the given group. Mutually exclusive with access_level and user_id.
group_inheritance_type int
Group inheritance allows deploy access levels to take inherited group membership into account. Valid values are 0, 1. 0 => Direct group membership only, 1 => All inherited groups. Default: 0
id int
The unique ID of the Deploy Access Level object.
user_id int
The ID of the user allowed to deploy to this protected environment. The user must be a member of the group with Maintainer role or higher. Mutually exclusive with access_level and group_id.
accessLevel String
Levels of access required to deploy to this protected environment. Mutually exclusive with user_id and group_id. Valid values are developer, maintainer.
accessLevelDescription String
Readable description of level of access.
groupId Number
The ID of the group allowed to deploy to this protected environment. The group must be a sub-group under the given group. Mutually exclusive with access_level and user_id.
groupInheritanceType Number
Group inheritance allows deploy access levels to take inherited group membership into account. Valid values are 0, 1. 0 => Direct group membership only, 1 => All inherited groups. Default: 0
id Number
The unique ID of the Deploy Access Level object.
userId Number
The ID of the user allowed to deploy to this protected environment. The user must be a member of the group with Maintainer role or higher. Mutually exclusive with access_level and group_id.

Import

Starting in Terraform v1.5.0 you can use an import block to import gitlab_group_protected_environment. For example:

terraform

import {

to = gitlab_group_protected_environment.example

id = “see CLI command below for ID”

}

Import using the CLI is supported using the following syntax:

GitLab group protected environments can be imported using an id made up of groupId:environmentName, e.g.

$ pulumi import gitlab:index/groupProtectedEnvironment:GroupProtectedEnvironment bar 123:production
Copy

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

Package Details

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