You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The gitlab_release_link resource allows to manage the lifecycle of a release links.
7
+
Upstream API: GitLab REST API docs https://docs.gitlab.com/ee/api/releases/links.html
8
+
---
9
+
10
+
# gitlab_release_link (Resource)
11
+
12
+
The `gitlab_release_link` resource allows to manage the lifecycle of a release links.
13
+
14
+
**Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/releases/links.html)
15
+
16
+
## Example Usage
17
+
18
+
```terraform
19
+
# Create a project
20
+
resource "gitlab_project" "example" {
21
+
name = "example"
22
+
description = "An example project"
23
+
}
24
+
25
+
# Can create release link only to a tag associated with a release
26
+
resource "gitlab_release_link" "example" {
27
+
project = gitlab_project.example.id
28
+
tag_name = "tag_name_associated_with_release"
29
+
name = "test"
30
+
url = "https://test/"
31
+
}
32
+
```
33
+
34
+
<!-- schema generated by tfplugindocs -->
35
+
## Schema
36
+
37
+
### Required
38
+
39
+
-`name` (String) The name of the link. Link names must be unique within the release.
40
+
-`project` (String) The ID or [URL-encoded path of the project](https://docs.gitlab.com/ee/api/index.html#namespaced-path-encoding).
41
+
-`tag_name` (String) The tag associated with the Release.
42
+
-`url` (String) The URL of the link. Link URLs must be unique within the release.
43
+
44
+
### Optional
45
+
46
+
-`filepath` (String) Relatively path for a [Direct Asset link](https://docs.gitlab.com/ee/user/project/releases/index.html#permanent-links-to-release-assets).
47
+
-`link_type` (String) The type of the link: `other`, `runbook`, `image`, `package`. Defaults to other.
48
+
49
+
### Read-Only
50
+
51
+
-`direct_asset_link` (String) Full path for a [Direct Asset link](https://docs.gitlab.com/ee/user/project/releases/index.html#permanent-links-to-release-assets).
52
+
-`external` (Boolean) External or internal link.
53
+
-`id` (String) The ID of this resource.
54
+
-`link_id` (Number) The ID of the link.
55
+
56
+
## Import
57
+
58
+
Import is supported using the following syntax:
59
+
60
+
```shell
61
+
# Gitlab release link can be imported with a key composed of `<project>:<tag_name>:<link_id>`, e.g.
Description: "Optional path for a [Direct Asset link](https://docs.gitlab.com/ee/user/project/releases/index.html#permanent-links-to-release-assets).",
38
+
Description: "Relatively path for a [Direct Asset link](https://docs.gitlab.com/ee/user/project/releases/index.html#permanent-links-to-release-assets).",
0 commit comments