1. Packages
  2. Gitlab Provider
  3. API Docs
  4. getRelease
GitLab v8.10.0 published on Friday, Mar 21, 2025 by Pulumi

gitlab.getRelease

Explore with Pulumi AI

GitLab v8.10.0 published on Friday, Mar 21, 2025 by Pulumi

The gitlab.Release data source retrieves information about a gitlab release for a project.

Upstream API: GitLab REST API docs

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as gitlab from "@pulumi/gitlab";

// By project ID and tag_name
const example = gitlab.getRelease({
    projectId: "1234",
    tagName: "v1.0",
});
Copy
import pulumi
import pulumi_gitlab as gitlab

# By project ID and tag_name
example = gitlab.get_release(project_id="1234",
    tag_name="v1.0")
Copy
package main

import (
	"github.com/pulumi/pulumi-gitlab/sdk/v8/go/gitlab"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		// By project ID and tag_name
		_, err := gitlab.LookupRelease(ctx, &gitlab.LookupReleaseArgs{
			ProjectId: "1234",
			TagName:   "v1.0",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using GitLab = Pulumi.GitLab;

return await Deployment.RunAsync(() => 
{
    // By project ID and tag_name
    var example = GitLab.GetRelease.Invoke(new()
    {
        ProjectId = "1234",
        TagName = "v1.0",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gitlab.GitlabFunctions;
import com.pulumi.gitlab.inputs.GetReleaseArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        // By project ID and tag_name
        final var example = GitlabFunctions.getRelease(GetReleaseArgs.builder()
            .projectId(1234)
            .tagName("v1.0")
            .build());

    }
}
Copy
variables:
  # By project ID and tag_name
  example:
    fn::invoke:
      function: gitlab:getRelease
      arguments:
        projectId: 1234
        tagName: v1.0
Copy

Using getRelease

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getRelease(args: GetReleaseArgs, opts?: InvokeOptions): Promise<GetReleaseResult>
function getReleaseOutput(args: GetReleaseOutputArgs, opts?: InvokeOptions): Output<GetReleaseResult>
Copy
def get_release(assets: Optional[GetReleaseAssets] = None,
                project_id: Optional[str] = None,
                tag_name: Optional[str] = None,
                opts: Optional[InvokeOptions] = None) -> GetReleaseResult
def get_release_output(assets: Optional[pulumi.Input[GetReleaseAssetsArgs]] = None,
                project_id: Optional[pulumi.Input[str]] = None,
                tag_name: Optional[pulumi.Input[str]] = None,
                opts: Optional[InvokeOptions] = None) -> Output[GetReleaseResult]
Copy
func LookupRelease(ctx *Context, args *LookupReleaseArgs, opts ...InvokeOption) (*LookupReleaseResult, error)
func LookupReleaseOutput(ctx *Context, args *LookupReleaseOutputArgs, opts ...InvokeOption) LookupReleaseResultOutput
Copy

> Note: This function is named LookupRelease in the Go SDK.

public static class GetRelease 
{
    public static Task<GetReleaseResult> InvokeAsync(GetReleaseArgs args, InvokeOptions? opts = null)
    public static Output<GetReleaseResult> Invoke(GetReleaseInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetReleaseResult> getRelease(GetReleaseArgs args, InvokeOptions options)
public static Output<GetReleaseResult> getRelease(GetReleaseArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: gitlab:index/getRelease:getRelease
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

ProjectId This property is required. string
The ID or URL-encoded path of the project.
TagName This property is required. string
The Git tag the release is associated with.
Assets Pulumi.GitLab.Inputs.GetReleaseAssets
The assets for a release
ProjectId This property is required. string
The ID or URL-encoded path of the project.
TagName This property is required. string
The Git tag the release is associated with.
Assets GetReleaseAssets
The assets for a release
projectId This property is required. String
The ID or URL-encoded path of the project.
tagName This property is required. String
The Git tag the release is associated with.
assets GetReleaseAssets
The assets for a release
projectId This property is required. string
The ID or URL-encoded path of the project.
tagName This property is required. string
The Git tag the release is associated with.
assets GetReleaseAssets
The assets for a release
project_id This property is required. str
The ID or URL-encoded path of the project.
tag_name This property is required. str
The Git tag the release is associated with.
assets GetReleaseAssets
The assets for a release
projectId This property is required. String
The ID or URL-encoded path of the project.
tagName This property is required. String
The Git tag the release is associated with.
assets Property Map
The assets for a release

getRelease Result

The following output properties are available:

CreatedAt string
The date the release was created.
Description string
An HTML rendered description of the release.
Id string
Name string
The name of the release.
ProjectId string
The ID or URL-encoded path of the project.
ReleasedAt string
The date the release was created.
TagName string
The Git tag the release is associated with.
Assets Pulumi.GitLab.Outputs.GetReleaseAssets
The assets for a release
CreatedAt string
The date the release was created.
Description string
An HTML rendered description of the release.
Id string
Name string
The name of the release.
ProjectId string
The ID or URL-encoded path of the project.
ReleasedAt string
The date the release was created.
TagName string
The Git tag the release is associated with.
Assets GetReleaseAssets
The assets for a release
createdAt String
The date the release was created.
description String
An HTML rendered description of the release.
id String
name String
The name of the release.
projectId String
The ID or URL-encoded path of the project.
releasedAt String
The date the release was created.
tagName String
The Git tag the release is associated with.
assets GetReleaseAssets
The assets for a release
createdAt string
The date the release was created.
description string
An HTML rendered description of the release.
id string
name string
The name of the release.
projectId string
The ID or URL-encoded path of the project.
releasedAt string
The date the release was created.
tagName string
The Git tag the release is associated with.
assets GetReleaseAssets
The assets for a release
created_at str
The date the release was created.
description str
An HTML rendered description of the release.
id str
name str
The name of the release.
project_id str
The ID or URL-encoded path of the project.
released_at str
The date the release was created.
tag_name str
The Git tag the release is associated with.
assets GetReleaseAssets
The assets for a release
createdAt String
The date the release was created.
description String
An HTML rendered description of the release.
id String
name String
The name of the release.
projectId String
The ID or URL-encoded path of the project.
releasedAt String
The date the release was created.
tagName String
The Git tag the release is associated with.
assets Property Map
The assets for a release

Supporting Types

GetReleaseAssets

Count This property is required. int
The number of assets for a release
Links List<Pulumi.GitLab.Inputs.GetReleaseAssetsLink>
The links for a release
Sources List<Pulumi.GitLab.Inputs.GetReleaseAssetsSource>
The sources for a release
Count This property is required. int
The number of assets for a release
Links []GetReleaseAssetsLink
The links for a release
Sources []GetReleaseAssetsSource
The sources for a release
count This property is required. Integer
The number of assets for a release
links List<GetReleaseAssetsLink>
The links for a release
sources List<GetReleaseAssetsSource>
The sources for a release
count This property is required. number
The number of assets for a release
links GetReleaseAssetsLink[]
The links for a release
sources GetReleaseAssetsSource[]
The sources for a release
count This property is required. int
The number of assets for a release
links Sequence[GetReleaseAssetsLink]
The links for a release
sources Sequence[GetReleaseAssetsSource]
The sources for a release
count This property is required. Number
The number of assets for a release
links List<Property Map>
The links for a release
sources List<Property Map>
The sources for a release
Id This property is required. int
The ID of the link
LinkType This property is required. string
The type of the link
Name This property is required. string
The name of the link
Url This property is required. string
The URL of the link
Id This property is required. int
The ID of the link
LinkType This property is required. string
The type of the link
Name This property is required. string
The name of the link
Url This property is required. string
The URL of the link
id This property is required. Integer
The ID of the link
linkType This property is required. String
The type of the link
name This property is required. String
The name of the link
url This property is required. String
The URL of the link
id This property is required. number
The ID of the link
linkType This property is required. string
The type of the link
name This property is required. string
The name of the link
url This property is required. string
The URL of the link
id This property is required. int
The ID of the link
link_type This property is required. str
The type of the link
name This property is required. str
The name of the link
url This property is required. str
The URL of the link
id This property is required. Number
The ID of the link
linkType This property is required. String
The type of the link
name This property is required. String
The name of the link
url This property is required. String
The URL of the link

GetReleaseAssetsSource

Format This property is required. string
The format of the source
Url This property is required. string
The URL of the source
Format This property is required. string
The format of the source
Url This property is required. string
The URL of the source
format This property is required. String
The format of the source
url This property is required. String
The URL of the source
format This property is required. string
The format of the source
url This property is required. string
The URL of the source
format This property is required. str
The format of the source
url This property is required. str
The URL of the source
format This property is required. String
The format of the source
url This property is required. String
The URL of the source

Package Details

Repository
GitLab pulumi/pulumi-gitlab
License
Apache-2.0
Notes
This Pulumi package is based on the gitlab Terraform Provider.
GitLab v8.10.0 published on Friday, Mar 21, 2025 by Pulumi