Release Link Args
data class ReleaseLinkArgs(val filepath: Output<String>? = null, val linkType: Output<String>? = null, val name: Output<String>? = null, val project: Output<String>? = null, val tagName: Output<String>? = null, val url: Output<String>? = null) : ConvertibleToJava<ReleaseLinkArgs>
The gitlab.ReleaseLink
resource allows to manage the lifecycle of a release link. Upstream API: GitLab REST API docs
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as gitlab from "@pulumi/gitlab";
// Create a project
const exampleProject = new gitlab.Project("exampleProject", {description: "An example project"});
// Can create release link only to a tag associated with a release
const exampleReleaseLink = new gitlab.ReleaseLink("exampleReleaseLink", {
project: exampleProject.id,
tagName: "tag_name_associated_with_release",
url: "https://test/",
});
Content copied to clipboard
import pulumi
import pulumi_gitlab as gitlab
# Create a project
example_project = gitlab.Project("exampleProject", description="An example project")
# Can create release link only to a tag associated with a release
example_release_link = gitlab.ReleaseLink("exampleReleaseLink",
project=example_project.id,
tag_name="tag_name_associated_with_release",
url="https://test/")
Content copied to clipboard
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using GitLab = Pulumi.GitLab;
return await Deployment.RunAsync(() =>
{
// Create a project
var exampleProject = new GitLab.Project("exampleProject", new()
{
Description = "An example project",
});
// Can create release link only to a tag associated with a release
var exampleReleaseLink = new GitLab.ReleaseLink("exampleReleaseLink", new()
{
Project = exampleProject.Id,
TagName = "tag_name_associated_with_release",
Url = "https://test/",
});
});
Content copied to clipboard
package main
import (
"github.com/pulumi/pulumi-gitlab/sdk/v6/go/gitlab"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
// Create a project
exampleProject, err := gitlab.NewProject(ctx, "exampleProject", &gitlab.ProjectArgs{
Description: pulumi.String("An example project"),
})
if err != nil {
return err
}
// Can create release link only to a tag associated with a release
_, err = gitlab.NewReleaseLink(ctx, "exampleReleaseLink", &gitlab.ReleaseLinkArgs{
Project: exampleProject.ID(),
TagName: pulumi.String("tag_name_associated_with_release"),
Url: pulumi.String("https://test/"),
})
if err != nil {
return err
}
return nil
})
}
Content copied to clipboard
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gitlab.Project;
import com.pulumi.gitlab.ProjectArgs;
import com.pulumi.gitlab.ReleaseLink;
import com.pulumi.gitlab.ReleaseLinkArgs;
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) {
// Create a project
var exampleProject = new Project("exampleProject", ProjectArgs.builder()
.description("An example project")
.build());
// Can create release link only to a tag associated with a release
var exampleReleaseLink = new ReleaseLink("exampleReleaseLink", ReleaseLinkArgs.builder()
.project(exampleProject.id())
.tagName("tag_name_associated_with_release")
.url("https://test/")
.build());
}
}
Content copied to clipboard
resources:
# Create a project
exampleProject:
type: gitlab:Project
properties:
description: An example project
# Can create release link only to a tag associated with a release
exampleReleaseLink:
type: gitlab:ReleaseLink
properties:
project: ${exampleProject.id}
tagName: tag_name_associated_with_release
url: https://test/
Content copied to clipboard
Import
Gitlab release link can be imported with a key composed of <project>:<tag_name>:<link_id>
, e.g.
$ pulumi import gitlab:index/releaseLink:ReleaseLink example "12345:test:2"
Content copied to clipboard
Constructors
Properties
Link copied to clipboard
Relative path for a Direct Asset link.
Link copied to clipboard
The ID or URL-encoded path of the project.