|
| 1 | +--- |
| 2 | +# generated by https://github.com/hashicorp/terraform-plugin-docs |
| 3 | +page_title: "gitlab_release Data Source - terraform-provider-gitlab" |
| 4 | +subcategory: "" |
| 5 | +description: |- |
| 6 | + The gitlab_release data source retrieves information about a gitlab release for a project. |
| 7 | + Upstream API: GitLab REST API docs https://docs.gitlab.com/ee/api/releases/ |
| 8 | +--- |
| 9 | + |
| 10 | +# gitlab_release (Data Source) |
| 11 | + |
| 12 | +The `gitlab_release` data source retrieves information about a gitlab release for a project. |
| 13 | + |
| 14 | +**Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/releases/) |
| 15 | + |
| 16 | +## Example Usage |
| 17 | + |
| 18 | +```terraform |
| 19 | +# By project ID and tag_name |
| 20 | +data "gitlab_release" "example" { |
| 21 | + project_id = 1234 |
| 22 | + tag_name = "v1.0" |
| 23 | +} |
| 24 | +``` |
| 25 | + |
| 26 | +<!-- schema generated by tfplugindocs --> |
| 27 | +## Schema |
| 28 | + |
| 29 | +### Required |
| 30 | + |
| 31 | +- `project_id` (String) The ID or URL-encoded path of the project. |
| 32 | +- `tag_name` (String) The Git tag the release is associated with. |
| 33 | + |
| 34 | +### Read-Only |
| 35 | + |
| 36 | +- `assets` (Block, Read-only) The assets for a release (see [below for nested schema](#nestedblock--assets)) |
| 37 | +- `created_at` (String) The date the release was created. |
| 38 | +- `description` (String) An HTML rendered description of the release. |
| 39 | +- `id` (String) The ID of this Terraform resource. In the format of `<project_id:tag_name>`. |
| 40 | +- `name` (String) The name of the release. |
| 41 | +- `released_at` (String) The date the release was created. |
| 42 | + |
| 43 | +<a id="nestedblock--assets"></a> |
| 44 | +### Nested Schema for `assets` |
| 45 | + |
| 46 | +Read-Only: |
| 47 | + |
| 48 | +- `count` (Number) The number of assets for a release |
| 49 | +- `links` (Block List) The links for a release (see [below for nested schema](#nestedblock--assets--links)) |
| 50 | +- `sources` (Block List) The sources for a release (see [below for nested schema](#nestedblock--assets--sources)) |
| 51 | + |
| 52 | +<a id="nestedblock--assets--links"></a> |
| 53 | +### Nested Schema for `assets.links` |
| 54 | + |
| 55 | +Read-Only: |
| 56 | + |
| 57 | +- `id` (Number) The ID of the link |
| 58 | +- `link_type` (String) The type of the link |
| 59 | +- `name` (String) The name of the link |
| 60 | +- `url` (String) The URL of the link |
| 61 | + |
| 62 | + |
| 63 | +<a id="nestedblock--assets--sources"></a> |
| 64 | +### Nested Schema for `assets.sources` |
| 65 | + |
| 66 | +Read-Only: |
| 67 | + |
| 68 | +- `format` (String) The format of the source |
| 69 | +- `url` (String) The URL of the source |
0 commit comments