1. Packages
  2. GitLab
  3. API Docs
  4. ProjectProtectedEnvironment
GitLab v6.11.0 published on Friday, Apr 19, 2024 by Pulumi

gitlab.ProjectProtectedEnvironment

Explore with Pulumi AI

gitlab logo
GitLab v6.11.0 published on Friday, Apr 19, 2024 by Pulumi

    The gitlab.ProjectProtectedEnvironment resource allows to manage the lifecycle of a protected environment in a project.

    In order to use a user or group in the deploy_access_levels configuration, you need to make sure that users have access to the project and groups must have this project shared. You may use the gitlab.ProjectMembership and gitlab_project_shared_group resources to achieve this. Unfortunately, the GitLab API does not complain about users and groups without access to the project and just ignores those. In case this happens you will get perpetual state diffs.

    Upstream API: GitLab REST API docs

    Example Usage

    Coming soon!
    
    Coming soon!
    
    Coming soon!
    
    Coming soon!
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gitlab.ProjectEnvironment;
    import com.pulumi.gitlab.ProjectEnvironmentArgs;
    import com.pulumi.gitlab.ProjectProtectedEnvironment;
    import com.pulumi.gitlab.ProjectProtectedEnvironmentArgs;
    import com.pulumi.gitlab.inputs.ProjectProtectedEnvironmentDeployAccessLevelArgs;
    import com.pulumi.gitlab.inputs.ProjectProtectedEnvironmentApprovalRuleArgs;
    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) {
            var this_ = new ProjectEnvironment("this", ProjectEnvironmentArgs.builder()        
                .project(123)
                .externalUrl("www.example.com")
                .build());
    
            // Example with deployment access level
            var exampleWithAccessLevel = new ProjectProtectedEnvironment("exampleWithAccessLevel", ProjectProtectedEnvironmentArgs.builder()        
                .project(this_.project())
                .requiredApprovalCount(1)
                .environment(this_.name())
                .deployAccessLevels(ProjectProtectedEnvironmentDeployAccessLevelArgs.builder()
                    .accessLevel("developer")
                    .build())
                .build());
    
            // Example with group-based deployment level
            var exampleWithGroup = new ProjectProtectedEnvironment("exampleWithGroup", ProjectProtectedEnvironmentArgs.builder()        
                .project(this_.project())
                .environment(this_.name())
                .deployAccessLevels(ProjectProtectedEnvironmentDeployAccessLevelArgs.builder()
                    .groupId(456)
                    .build())
                .build());
    
            // Example with user-based deployment level
            var exampleWithUser = new ProjectProtectedEnvironment("exampleWithUser", ProjectProtectedEnvironmentArgs.builder()        
                .project(this_.project())
                .environment(this_.name())
                .deployAccessLevels(ProjectProtectedEnvironmentDeployAccessLevelArgs.builder()
                    .userId(789)
                    .build())
                .build());
    
            // Example with multiple deployment access levels
            var exampleWithMultipleProjectProtectedEnvironment = new ProjectProtectedEnvironment("exampleWithMultipleProjectProtectedEnvironment", ProjectProtectedEnvironmentArgs.builder()        
                .project(this_.project())
                .requiredApprovalCount(2)
                .environment(this_.name())
                .deployAccessLevels(            
                    ProjectProtectedEnvironmentDeployAccessLevelArgs.builder()
                        .accessLevel("developer")
                        .build(),
                    ProjectProtectedEnvironmentDeployAccessLevelArgs.builder()
                        .groupId(456)
                        .build(),
                    ProjectProtectedEnvironmentDeployAccessLevelArgs.builder()
                        .userId(789)
                        .build())
                .build());
    
            // Example with access-level based approval rules
            var exampleWithMultipleIndex_projectProtectedEnvironmentProjectProtectedEnvironment = new ProjectProtectedEnvironment("exampleWithMultipleIndex/projectProtectedEnvironmentProjectProtectedEnvironment", ProjectProtectedEnvironmentArgs.builder()        
                .project(this_.project())
                .requiredApprovalCount(2)
                .environment(this_.name())
                .deployAccessLevels(ProjectProtectedEnvironmentDeployAccessLevelArgs.builder()
                    .accessLevel("developer")
                    .build())
                .approvalRules(ProjectProtectedEnvironmentApprovalRuleArgs.builder()
                    .access_level("developer")
                    .build())
                .build());
    
            // Example with multiple approval rules, using access level, user, and group
            var exampleWithMultipleGitlabIndex_projectProtectedEnvironmentProjectProtectedEnvironment = new ProjectProtectedEnvironment("exampleWithMultipleGitlabIndex/projectProtectedEnvironmentProjectProtectedEnvironment", ProjectProtectedEnvironmentArgs.builder()        
                .project(this_.project())
                .requiredApprovalCount(2)
                .environment(this_.name())
                .deployAccessLevels(ProjectProtectedEnvironmentDeployAccessLevelArgs.builder()
                    .accessLevel("developer")
                    .build())
                .approvalRules(            
                    ProjectProtectedEnvironmentApprovalRuleArgs.builder()
                        .user_id(789)
                        .build(),
                    ProjectProtectedEnvironmentApprovalRuleArgs.builder()
                        .access_level("developer")
                        .build(),
                    ProjectProtectedEnvironmentApprovalRuleArgs.builder()
                        .group_id(456)
                        .build())
                .build());
    
        }
    }
    
    resources:
      this:
        type: gitlab:ProjectEnvironment
        properties:
          project: 123
          externalUrl: www.example.com
      # Example with deployment access level
      exampleWithAccessLevel:
        type: gitlab:ProjectProtectedEnvironment
        properties:
          project: ${this.project}
          requiredApprovalCount: 1
          environment: ${this.name}
          deployAccessLevels:
            - accessLevel: developer
      # Example with group-based deployment level
      exampleWithGroup:
        type: gitlab:ProjectProtectedEnvironment
        properties:
          project: ${this.project}
          environment: ${this.name}
          deployAccessLevels:
            - groupId: 456
      # Example with user-based deployment level
      exampleWithUser:
        type: gitlab:ProjectProtectedEnvironment
        properties:
          project: ${this.project}
          environment: ${this.name}
          deployAccessLevels:
            - userId: 789
      # Example with multiple deployment access levels
      exampleWithMultipleProjectProtectedEnvironment:
        type: gitlab:ProjectProtectedEnvironment
        properties:
          project: ${this.project}
          requiredApprovalCount: 2
          environment: ${this.name}
          deployAccessLevels:
            - accessLevel: developer
            - groupId: 456
            - userId: 789
      # Example with access-level based approval rules
      exampleWithMultipleIndex/projectProtectedEnvironmentProjectProtectedEnvironment:
        type: gitlab:ProjectProtectedEnvironment
        properties:
          project: ${this.project}
          requiredApprovalCount: 2
          environment: ${this.name}
          deployAccessLevels:
            - accessLevel: developer
          approvalRules:
            - access_level: developer
      # Example with multiple approval rules, using access level, user, and group
      exampleWithMultipleGitlabIndex/projectProtectedEnvironmentProjectProtectedEnvironment:
        type: gitlab:ProjectProtectedEnvironment
        properties:
          project: ${this.project}
          requiredApprovalCount: 2
          environment: ${this.name}
          deployAccessLevels:
            - accessLevel: developer
          approvalRules:
            - user_id: 789
            - access_level: developer
            - group_id: 456
    

    Create ProjectProtectedEnvironment Resource

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

    Constructor syntax

    new ProjectProtectedEnvironment(name: string, args: ProjectProtectedEnvironmentArgs, opts?: CustomResourceOptions);
    @overload
    def ProjectProtectedEnvironment(resource_name: str,
                                    args: ProjectProtectedEnvironmentArgs,
                                    opts: Optional[ResourceOptions] = None)
    
    @overload
    def ProjectProtectedEnvironment(resource_name: str,
                                    opts: Optional[ResourceOptions] = None,
                                    environment: Optional[str] = None,
                                    project: Optional[str] = None,
                                    approval_rules: Optional[Sequence[ProjectProtectedEnvironmentApprovalRuleArgs]] = None,
                                    deploy_access_levels: Optional[Sequence[ProjectProtectedEnvironmentDeployAccessLevelArgs]] = None,
                                    required_approval_count: Optional[int] = None)
    func NewProjectProtectedEnvironment(ctx *Context, name string, args ProjectProtectedEnvironmentArgs, opts ...ResourceOption) (*ProjectProtectedEnvironment, error)
    public ProjectProtectedEnvironment(string name, ProjectProtectedEnvironmentArgs args, CustomResourceOptions? opts = null)
    public ProjectProtectedEnvironment(String name, ProjectProtectedEnvironmentArgs args)
    public ProjectProtectedEnvironment(String name, ProjectProtectedEnvironmentArgs args, CustomResourceOptions options)
    
    type: gitlab:ProjectProtectedEnvironment
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

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

    Example

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

    var projectProtectedEnvironmentResource = new GitLab.ProjectProtectedEnvironment("projectProtectedEnvironmentResource", new()
    {
        Environment = "string",
        Project = "string",
        ApprovalRules = new[]
        {
            new GitLab.Inputs.ProjectProtectedEnvironmentApprovalRuleArgs
            {
                AccessLevel = "string",
                AccessLevelDescription = "string",
                GroupId = 0,
                GroupInheritanceType = 0,
                Id = 0,
                RequiredApprovals = 0,
                UserId = 0,
            },
        },
        DeployAccessLevels = new[]
        {
            new GitLab.Inputs.ProjectProtectedEnvironmentDeployAccessLevelArgs
            {
                AccessLevel = "string",
                AccessLevelDescription = "string",
                GroupId = 0,
                GroupInheritanceType = 0,
                Id = 0,
                UserId = 0,
            },
        },
        RequiredApprovalCount = 0,
    });
    
    example, err := gitlab.NewProjectProtectedEnvironment(ctx, "projectProtectedEnvironmentResource", &gitlab.ProjectProtectedEnvironmentArgs{
    	Environment: pulumi.String("string"),
    	Project:     pulumi.String("string"),
    	ApprovalRules: gitlab.ProjectProtectedEnvironmentApprovalRuleArray{
    		&gitlab.ProjectProtectedEnvironmentApprovalRuleArgs{
    			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),
    		},
    	},
    	DeployAccessLevels: gitlab.ProjectProtectedEnvironmentDeployAccessLevelArray{
    		&gitlab.ProjectProtectedEnvironmentDeployAccessLevelArgs{
    			AccessLevel:            pulumi.String("string"),
    			AccessLevelDescription: pulumi.String("string"),
    			GroupId:                pulumi.Int(0),
    			GroupInheritanceType:   pulumi.Int(0),
    			Id:                     pulumi.Int(0),
    			UserId:                 pulumi.Int(0),
    		},
    	},
    	RequiredApprovalCount: pulumi.Int(0),
    })
    
    var projectProtectedEnvironmentResource = new ProjectProtectedEnvironment("projectProtectedEnvironmentResource", ProjectProtectedEnvironmentArgs.builder()        
        .environment("string")
        .project("string")
        .approvalRules(ProjectProtectedEnvironmentApprovalRuleArgs.builder()
            .accessLevel("string")
            .accessLevelDescription("string")
            .groupId(0)
            .groupInheritanceType(0)
            .id(0)
            .requiredApprovals(0)
            .userId(0)
            .build())
        .deployAccessLevels(ProjectProtectedEnvironmentDeployAccessLevelArgs.builder()
            .accessLevel("string")
            .accessLevelDescription("string")
            .groupId(0)
            .groupInheritanceType(0)
            .id(0)
            .userId(0)
            .build())
        .requiredApprovalCount(0)
        .build());
    
    project_protected_environment_resource = gitlab.ProjectProtectedEnvironment("projectProtectedEnvironmentResource",
        environment="string",
        project="string",
        approval_rules=[gitlab.ProjectProtectedEnvironmentApprovalRuleArgs(
            access_level="string",
            access_level_description="string",
            group_id=0,
            group_inheritance_type=0,
            id=0,
            required_approvals=0,
            user_id=0,
        )],
        deploy_access_levels=[gitlab.ProjectProtectedEnvironmentDeployAccessLevelArgs(
            access_level="string",
            access_level_description="string",
            group_id=0,
            group_inheritance_type=0,
            id=0,
            user_id=0,
        )],
        required_approval_count=0)
    
    const projectProtectedEnvironmentResource = new gitlab.ProjectProtectedEnvironment("projectProtectedEnvironmentResource", {
        environment: "string",
        project: "string",
        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,
        }],
        requiredApprovalCount: 0,
    });
    
    type: gitlab:ProjectProtectedEnvironment
    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
        project: string
        requiredApprovalCount: 0
    

    ProjectProtectedEnvironment Resource Properties

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

    Inputs

    The ProjectProtectedEnvironment resource accepts the following input properties:

    Environment string
    The name of the environment.
    Project string
    The ID or full path of the project which the protected environment is created against.
    ApprovalRules List<Pulumi.GitLab.Inputs.ProjectProtectedEnvironmentApprovalRule>
    Array of approval rules to deploy, with each described by a hash.
    DeployAccessLevels List<Pulumi.GitLab.Inputs.ProjectProtectedEnvironmentDeployAccessLevel>
    Array of access levels allowed to deploy, with each described by a hash.
    RequiredApprovalCount int
    The number of approvals required to deploy to this environment.
    Environment string
    The name of the environment.
    Project string
    The ID or full path of the project which the protected environment is created against.
    ApprovalRules []ProjectProtectedEnvironmentApprovalRuleArgs
    Array of approval rules to deploy, with each described by a hash.
    DeployAccessLevels []ProjectProtectedEnvironmentDeployAccessLevelArgs
    Array of access levels allowed to deploy, with each described by a hash.
    RequiredApprovalCount int
    The number of approvals required to deploy to this environment.
    environment String
    The name of the environment.
    project String
    The ID or full path of the project which the protected environment is created against.
    approvalRules List<ProjectProtectedEnvironmentApprovalRule>
    Array of approval rules to deploy, with each described by a hash.
    deployAccessLevels List<ProjectProtectedEnvironmentDeployAccessLevel>
    Array of access levels allowed to deploy, with each described by a hash.
    requiredApprovalCount Integer
    The number of approvals required to deploy to this environment.
    environment string
    The name of the environment.
    project string
    The ID or full path of the project which the protected environment is created against.
    approvalRules ProjectProtectedEnvironmentApprovalRule[]
    Array of approval rules to deploy, with each described by a hash.
    deployAccessLevels ProjectProtectedEnvironmentDeployAccessLevel[]
    Array of access levels allowed to deploy, with each described by a hash.
    requiredApprovalCount number
    The number of approvals required to deploy to this environment.
    environment str
    The name of the environment.
    project str
    The ID or full path of the project which the protected environment is created against.
    approval_rules Sequence[ProjectProtectedEnvironmentApprovalRuleArgs]
    Array of approval rules to deploy, with each described by a hash.
    deploy_access_levels Sequence[ProjectProtectedEnvironmentDeployAccessLevelArgs]
    Array of access levels allowed to deploy, with each described by a hash.
    required_approval_count int
    The number of approvals required to deploy to this environment.
    environment String
    The name of the environment.
    project String
    The ID or full path of the project which the protected environment is created against.
    approvalRules List<Property Map>
    Array of approval rules to deploy, with each described by a hash.
    deployAccessLevels List<Property Map>
    Array of access levels allowed to deploy, with each described by a hash.
    requiredApprovalCount Number
    The number of approvals required to deploy to this environment.

    Outputs

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

    Get an existing ProjectProtectedEnvironment 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?: ProjectProtectedEnvironmentState, opts?: CustomResourceOptions): ProjectProtectedEnvironment
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            approval_rules: Optional[Sequence[ProjectProtectedEnvironmentApprovalRuleArgs]] = None,
            deploy_access_levels: Optional[Sequence[ProjectProtectedEnvironmentDeployAccessLevelArgs]] = None,
            environment: Optional[str] = None,
            project: Optional[str] = None,
            required_approval_count: Optional[int] = None) -> ProjectProtectedEnvironment
    func GetProjectProtectedEnvironment(ctx *Context, name string, id IDInput, state *ProjectProtectedEnvironmentState, opts ...ResourceOption) (*ProjectProtectedEnvironment, error)
    public static ProjectProtectedEnvironment Get(string name, Input<string> id, ProjectProtectedEnvironmentState? state, CustomResourceOptions? opts = null)
    public static ProjectProtectedEnvironment get(String name, Output<String> id, ProjectProtectedEnvironmentState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    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
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    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
    The unique name of the resulting resource.
    id
    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
    The unique name of the resulting resource.
    id
    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.ProjectProtectedEnvironmentApprovalRule>
    Array of approval rules to deploy, with each described by a hash.
    DeployAccessLevels List<Pulumi.GitLab.Inputs.ProjectProtectedEnvironmentDeployAccessLevel>
    Array of access levels allowed to deploy, with each described by a hash.
    Environment string
    The name of the environment.
    Project string
    The ID or full path of the project which the protected environment is created against.
    RequiredApprovalCount int
    The number of approvals required to deploy to this environment.
    ApprovalRules []ProjectProtectedEnvironmentApprovalRuleArgs
    Array of approval rules to deploy, with each described by a hash.
    DeployAccessLevels []ProjectProtectedEnvironmentDeployAccessLevelArgs
    Array of access levels allowed to deploy, with each described by a hash.
    Environment string
    The name of the environment.
    Project string
    The ID or full path of the project which the protected environment is created against.
    RequiredApprovalCount int
    The number of approvals required to deploy to this environment.
    approvalRules List<ProjectProtectedEnvironmentApprovalRule>
    Array of approval rules to deploy, with each described by a hash.
    deployAccessLevels List<ProjectProtectedEnvironmentDeployAccessLevel>
    Array of access levels allowed to deploy, with each described by a hash.
    environment String
    The name of the environment.
    project String
    The ID or full path of the project which the protected environment is created against.
    requiredApprovalCount Integer
    The number of approvals required to deploy to this environment.
    approvalRules ProjectProtectedEnvironmentApprovalRule[]
    Array of approval rules to deploy, with each described by a hash.
    deployAccessLevels ProjectProtectedEnvironmentDeployAccessLevel[]
    Array of access levels allowed to deploy, with each described by a hash.
    environment string
    The name of the environment.
    project string
    The ID or full path of the project which the protected environment is created against.
    requiredApprovalCount number
    The number of approvals required to deploy to this environment.
    approval_rules Sequence[ProjectProtectedEnvironmentApprovalRuleArgs]
    Array of approval rules to deploy, with each described by a hash.
    deploy_access_levels Sequence[ProjectProtectedEnvironmentDeployAccessLevelArgs]
    Array of access levels allowed to deploy, with each described by a hash.
    environment str
    The name of the environment.
    project str
    The ID or full path of the project which the protected environment is created against.
    required_approval_count int
    The number of approvals required to deploy to this environment.
    approvalRules List<Property Map>
    Array of approval rules to deploy, with each described by a hash.
    deployAccessLevels List<Property Map>
    Array of access levels allowed to deploy, with each described by a hash.
    environment String
    The name of the environment.
    project String
    The ID or full path of the project which the protected environment is created against.
    requiredApprovalCount Number
    The number of approvals required to deploy to this environment.

    Supporting Types

    ProjectProtectedEnvironmentApprovalRule, ProjectProtectedEnvironmentApprovalRuleArgs

    AccessLevel string
    Levels of access allowed to approve a deployment to this protected environment. 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. The project must be shared with the group. This is mutually exclusive with 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 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 project. This is mutually exclusive with groupid and requiredapprovals.
    AccessLevel string
    Levels of access allowed to approve a deployment to this protected environment. 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. The project must be shared with the group. This is mutually exclusive with 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 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 project. This is mutually exclusive with groupid and requiredapprovals.
    accessLevel String
    Levels of access allowed to approve a deployment to this protected environment. 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. The project must be shared with the group. This is mutually exclusive with 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 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 project. This is mutually exclusive with groupid and requiredapprovals.
    accessLevel string
    Levels of access allowed to approve a deployment to this protected environment. 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. The project must be shared with the group. This is mutually exclusive with 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 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 project. This is mutually exclusive with groupid and requiredapprovals.
    access_level str
    Levels of access allowed to approve a deployment to this protected environment. 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. The project must be shared with the group. This is mutually exclusive with 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 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 project. This is mutually exclusive with groupid and requiredapprovals.
    accessLevel String
    Levels of access allowed to approve a deployment to this protected environment. 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. The project must be shared with the group. This is mutually exclusive with 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 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 project. This is mutually exclusive with groupid and requiredapprovals.

    ProjectProtectedEnvironmentDeployAccessLevel, ProjectProtectedEnvironmentDeployAccessLevelArgs

    AccessLevel string
    Levels of access required to deploy to this protected environment. 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 project must be shared with the group.
    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 project.
    AccessLevel string
    Levels of access required to deploy to this protected environment. 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 project must be shared with the group.
    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 project.
    accessLevel String
    Levels of access required to deploy to this protected environment. 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 project must be shared with the group.
    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 project.
    accessLevel string
    Levels of access required to deploy to this protected environment. 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 project must be shared with the group.
    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 project.
    access_level str
    Levels of access required to deploy to this protected environment. 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 project must be shared with the group.
    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 project.
    accessLevel String
    Levels of access required to deploy to this protected environment. 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 project must be shared with the group.
    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 project.

    Import

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

    $ pulumi import gitlab:index/projectProtectedEnvironment:ProjectProtectedEnvironment bar 123:production
    

    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.
    gitlab logo
    GitLab v6.11.0 published on Friday, Apr 19, 2024 by Pulumi