gitlab_project_tag (Resource)

The gitlab_project_tag resource allows to manage the lifecycle of a tag in a project.

Upstream API: GitLab API docs

Example Usage

# Create a project for the tag to use
resource "gitlab_project" "example" {
  name         = "example"
  description  = "An example project"
  namespace_id = gitlab_group.example.id
}

resource "gitlab_project_tag" "example" {
  name    = "example"
  ref     = "main"
  project = gitlab_project.example.id
}

Schema

Required

Optional

Read-Only

Nested Schema for commit

Read-Only:

Nested Schema for release

Read-Only:

Import

Import is supported using the following syntax:

# Gitlab project tags can be imported with a key composed of `<project_id>:<tag_name>`, e.g.
terraform import gitlab_project_tag.example "12345:develop"

# NOTE: the `ref` attribute won't be available for imported `gitlab_project_tag` resources.