gitlab_tag_protection (Resource)

The gitlab_tag_protection resource allows to manage the lifecycle of a tag protection.

Upstream API: GitLab REST API docs

Example Usage

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
  }
}

Schema

Required

Optional

Read-Only

Nested Schema for allowed_to_create

Optional:

Read-Only:

Import

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