gitlab.ReleaseLink
Explore with Pulumi AI
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 example = new gitlab.Project("example", {
name: "example",
description: "An example project",
});
// Can create release link only to a tag associated with a release
const exampleReleaseLink = new gitlab.ReleaseLink("example", {
project: example.id,
tagName: "tag_name_associated_with_release",
name: "test",
url: "https://test/",
});
import pulumi
import pulumi_gitlab as gitlab
# Create a project
example = gitlab.Project("example",
name="example",
description="An example project")
# Can create release link only to a tag associated with a release
example_release_link = gitlab.ReleaseLink("example",
project=example.id,
tag_name="tag_name_associated_with_release",
name="test",
url="https://test/")
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 {
// Create a project
example, err := gitlab.NewProject(ctx, "example", &gitlab.ProjectArgs{
Name: pulumi.String("example"),
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, "example", &gitlab.ReleaseLinkArgs{
Project: example.ID(),
TagName: pulumi.String("tag_name_associated_with_release"),
Name: pulumi.String("test"),
Url: pulumi.String("https://test/"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using GitLab = Pulumi.GitLab;
return await Deployment.RunAsync(() =>
{
// Create a project
var example = new GitLab.Project("example", new()
{
Name = "example",
Description = "An example project",
});
// Can create release link only to a tag associated with a release
var exampleReleaseLink = new GitLab.ReleaseLink("example", new()
{
Project = example.Id,
TagName = "tag_name_associated_with_release",
Name = "test",
Url = "https://test/",
});
});
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 example = new Project("example", ProjectArgs.builder()
.name("example")
.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(example.id())
.tagName("tag_name_associated_with_release")
.name("test")
.url("https://test/")
.build());
}
}
resources:
# Create a project
example:
type: gitlab:Project
properties:
name: example
description: An example project
# Can create release link only to a tag associated with a release
exampleReleaseLink:
type: gitlab:ReleaseLink
name: example
properties:
project: ${example.id}
tagName: tag_name_associated_with_release
name: test
url: https://test/
Create ReleaseLink Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ReleaseLink(name: string, args: ReleaseLinkArgs, opts?: CustomResourceOptions);
@overload
def ReleaseLink(resource_name: str,
args: ReleaseLinkArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ReleaseLink(resource_name: str,
opts: Optional[ResourceOptions] = None,
project: Optional[str] = None,
tag_name: Optional[str] = None,
url: Optional[str] = None,
filepath: Optional[str] = None,
link_type: Optional[str] = None,
name: Optional[str] = None)
func NewReleaseLink(ctx *Context, name string, args ReleaseLinkArgs, opts ...ResourceOption) (*ReleaseLink, error)
public ReleaseLink(string name, ReleaseLinkArgs args, CustomResourceOptions? opts = null)
public ReleaseLink(String name, ReleaseLinkArgs args)
public ReleaseLink(String name, ReleaseLinkArgs args, CustomResourceOptions options)
type: gitlab:ReleaseLink
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args ReleaseLinkArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args ReleaseLinkArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args ReleaseLinkArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ReleaseLinkArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ReleaseLinkArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var releaseLinkResource = new GitLab.ReleaseLink("releaseLinkResource", new()
{
Project = "string",
TagName = "string",
Url = "string",
Filepath = "string",
LinkType = "string",
Name = "string",
});
example, err := gitlab.NewReleaseLink(ctx, "releaseLinkResource", &gitlab.ReleaseLinkArgs{
Project: pulumi.String("string"),
TagName: pulumi.String("string"),
Url: pulumi.String("string"),
Filepath: pulumi.String("string"),
LinkType: pulumi.String("string"),
Name: pulumi.String("string"),
})
var releaseLinkResource = new ReleaseLink("releaseLinkResource", ReleaseLinkArgs.builder()
.project("string")
.tagName("string")
.url("string")
.filepath("string")
.linkType("string")
.name("string")
.build());
release_link_resource = gitlab.ReleaseLink("releaseLinkResource",
project="string",
tag_name="string",
url="string",
filepath="string",
link_type="string",
name="string")
const releaseLinkResource = new gitlab.ReleaseLink("releaseLinkResource", {
project: "string",
tagName: "string",
url: "string",
filepath: "string",
linkType: "string",
name: "string",
});
type: gitlab:ReleaseLink
properties:
filepath: string
linkType: string
name: string
project: string
tagName: string
url: string
ReleaseLink Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The ReleaseLink resource accepts the following input properties:
- 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. - 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. - 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. - 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. - name string
- The name of the link. Link names must be unique within the release.
- project str
- The ID or URL-encoded path of the project.
- tag_
name str - The tag associated with the Release.
- url str
- The URL of the link. Link URLs must be unique within the release.
- filepath str
- Relative path for a Direct Asset link.
- link_
type str - The type of the link. Valid values are
other
,runbook
,image
,package
. Defaults to other. - name str
- 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. - name String
- The name of the link. Link names must be unique within the release.
Outputs
All input properties are implicitly available as output properties. Additionally, the ReleaseLink resource produces the following output properties:
- Direct
Asset stringUrl - Full path for a Direct Asset link.
- External bool
- External or internal link.
- Id string
- The provider-assigned unique ID for this managed resource.
- Link
Id int - The ID of the link.
- Direct
Asset stringUrl - Full path for a Direct Asset link.
- External bool
- External or internal link.
- Id string
- The provider-assigned unique ID for this managed resource.
- Link
Id int - The ID of the link.
- direct
Asset StringUrl - Full path for a Direct Asset link.
- external Boolean
- External or internal link.
- id String
- The provider-assigned unique ID for this managed resource.
- link
Id Integer - The ID of the link.
- direct
Asset stringUrl - Full path for a Direct Asset link.
- external boolean
- External or internal link.
- id string
- The provider-assigned unique ID for this managed resource.
- link
Id number - The ID of the link.
- direct_
asset_ strurl - Full path for a Direct Asset link.
- external bool
- External or internal link.
- id str
- The provider-assigned unique ID for this managed resource.
- link_
id int - The ID of the link.
- direct
Asset StringUrl - Full path for a Direct Asset link.
- external Boolean
- External or internal link.
- id String
- The provider-assigned unique ID for this managed resource.
- link
Id Number - The ID of the link.
Look up Existing ReleaseLink Resource
Get an existing ReleaseLink resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: ReleaseLinkState, opts?: CustomResourceOptions): ReleaseLink
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
direct_asset_url: Optional[str] = None,
external: Optional[bool] = None,
filepath: Optional[str] = None,
link_id: Optional[int] = None,
link_type: Optional[str] = None,
name: Optional[str] = None,
project: Optional[str] = None,
tag_name: Optional[str] = None,
url: Optional[str] = None) -> ReleaseLink
func GetReleaseLink(ctx *Context, name string, id IDInput, state *ReleaseLinkState, opts ...ResourceOption) (*ReleaseLink, error)
public static ReleaseLink Get(string name, Input<string> id, ReleaseLinkState? state, CustomResourceOptions? opts = null)
public static ReleaseLink get(String name, Output<String> id, ReleaseLinkState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Direct
Asset stringUrl - Full path for a Direct Asset link.
- External bool
- External or internal link.
- Filepath string
- Relative path for a Direct Asset link.
- Link
Id int - The ID of the link.
- Link
Type string - The type of the link. Valid values are
other
,runbook
,image
,package
. Defaults to other. - 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.
- Direct
Asset stringUrl - Full path for a Direct Asset link.
- External bool
- External or internal link.
- Filepath string
- Relative path for a Direct Asset link.
- Link
Id int - The ID of the link.
- Link
Type string - The type of the link. Valid values are
other
,runbook
,image
,package
. Defaults to other. - 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.
- direct
Asset StringUrl - Full path for a Direct Asset link.
- external Boolean
- External or internal link.
- filepath String
- Relative path for a Direct Asset link.
- link
Id Integer - The ID of the link.
- link
Type String - The type of the link. Valid values are
other
,runbook
,image
,package
. Defaults to other. - 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.
- direct
Asset stringUrl - Full path for a Direct Asset link.
- external boolean
- External or internal link.
- filepath string
- Relative path for a Direct Asset link.
- link
Id number - The ID of the link.
- link
Type string - The type of the link. Valid values are
other
,runbook
,image
,package
. Defaults to other. - 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.
- direct_
asset_ strurl - Full path for a Direct Asset link.
- external bool
- External or internal link.
- filepath str
- Relative path for a Direct Asset link.
- link_
id int - The ID of the link.
- link_
type str - The type of the link. Valid values are
other
,runbook
,image
,package
. Defaults to other. - name str
- The name of the link. Link names must be unique within the release.
- project str
- The ID or URL-encoded path of the project.
- tag_
name str - The tag associated with the Release.
- url str
- The URL of the link. Link URLs must be unique within the release.
- direct
Asset StringUrl - Full path for a Direct Asset link.
- external Boolean
- External or internal link.
- filepath String
- Relative path for a Direct Asset link.
- link
Id Number - The ID of the link.
- link
Type String - The type of the link. Valid values are
other
,runbook
,image
,package
. Defaults to other. - 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.
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"
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- GitLab pulumi/pulumi-gitlab
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
gitlab
Terraform Provider.