ProjectProtectedEnvironmentArgs

data class ProjectProtectedEnvironmentArgs(val approvalRules: Output<List<ProjectProtectedEnvironmentApprovalRuleArgs>>? = null, val deployAccessLevels: Output<List<ProjectProtectedEnvironmentDeployAccessLevelArgs>>? = null, val environment: Output<String>? = null, val project: Output<String>? = null) : ConvertibleToJava<ProjectProtectedEnvironmentArgs>

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

Import

Starting in Terraform v1.5.0 you can use an import block to import gitlab_project_protected_environment. For example: terraform import { to = gitlab_project_protected_environment.example id = "see CLI command below for ID" } Import using the CLI is supported using the following syntax: 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

Constructors

Link copied to clipboard
constructor(approvalRules: Output<List<ProjectProtectedEnvironmentApprovalRuleArgs>>? = null, deployAccessLevels: Output<List<ProjectProtectedEnvironmentDeployAccessLevelArgs>>? = null, environment: Output<String>? = null, project: Output<String>? = null)

Properties

Link copied to clipboard

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.

Link copied to clipboard

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.

Link copied to clipboard
val environment: Output<String>? = null

The name of the environment.

Link copied to clipboard
val project: Output<String>? = null

The ID or full path of the project which the protected environment is created against.

Functions

Link copied to clipboard
open override fun toJava(): ProjectProtectedEnvironmentArgs