The gitlab_release_link
resource allows to manage the lifecycle of a release link.
Upstream API: GitLab REST API docs
# Create a project
resource "gitlab_project" "example" {
name = "example"
description = "An example project"
}
# Can create release link only to a tag associated with a release
resource "gitlab_release_link" "example" {
project = gitlab_project.example.id
tag_name = "tag_name_associated_with_release"
name = "test"
url = "https://test/"
}
name
(String) The name of the link. Link names must be unique within the release.project
(String) The ID or URL-encoded path of the project.tag_name
(String) The tag associated with the Release.url
(String) The URL of the link. Link URLs must be unique within the release.filepath
(String) Relative path for a Direct Asset link.link_type
(String) The type of the link. Valid values are other
, runbook
, image
, package
. Defaults to other.direct_asset_url
(String) Full path for a Direct Asset link.external
(Boolean) External or internal link.id
(String) The ID of this resource.link_id
(Number) The ID of the link.Import is supported using the following syntax:
# Gitlab release link can be imported with a key composed of `<project>:<tag_name>:<link_id>`, e.g.
terraform import gitlab_release_link.example "12345:test:2"