The gitlab_tag_protection
resource allows to manage the lifecycle of a tag protection.
Upstream API: GitLab REST API docs
resource "gitlab_tag_protection" "TagProtect" {
project = "12345"
tag = "TagProtected"
create_access_level = "developer"
allowed_to_create {
user_id = 42
}
allowed_to_create {
group_id = 43
}
}
create_access_level
(String) Access levels which are allowed to create. Valid values are: no one
, developer
, maintainer
.project
(String) The id of the project.tag
(String) Name of the tag or wildcard.allowed_to_create
(Block Set) User or group which are allowed to create. (see below for nested schema)id
(String) The ID of this resource.allowed_to_create
Optional:
group_id
(Number) The ID of a GitLab group allowed to perform the relevant action. Mutually exclusive with user_id
.user_id
(Number) The ID of a GitLab user allowed to perform the relevant action. Mutually exclusive with group_id
.Read-Only:
access_level
(String) Level of access.access_level_description
(String) Readable description of level of access.Import is supported using the following syntax:
# Tag protections can be imported using an id made up of `project_id:tag_name`, e.g.
terraform import gitlab_tag_protection.example 123456789:v1.0.0