Project Protected Environment
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 thegitlab.ProjectMembership
andgitlab_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
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
Properties
Array of approval rules to deploy, with each described by a hash.
Array of access levels allowed to deploy, with each described by a hash.
The name of the environment.
The number of approvals required to deploy to this environment.