ProjectBadge

# gitlab_project_badge

This resource allows you to create and manage badges for your GitLab projects. For further information on hooks, consult the gitlab documentation.

Example Usage

using Pulumi;
using GitLab = Pulumi.GitLab;

class MyStack : Stack
{
    public MyStack()
    {
        var foo = new GitLab.Project("foo", new GitLab.ProjectArgs
        {
        });
        var example = new GitLab.ProjectBadge("example", new GitLab.ProjectBadgeArgs
        {
            Project = foo.Id,
            LinkUrl = "https://example.com/badge-123",
            ImageUrl = "https://example.com/badge-123.svg",
        });
    }

}
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		foo, err := gitlab.NewProject(ctx, "foo", nil)
		if err != nil {
			return err
		}
		_, err = gitlab.NewProjectBadge(ctx, "example", &gitlab.ProjectBadgeArgs{
			Project:  foo.ID(),
			LinkUrl:  pulumi.String("https://example.com/badge-123"),
			ImageUrl: pulumi.String("https://example.com/badge-123.svg"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
import pulumi
import pulumi_gitlab as gitlab

foo = gitlab.Project("foo")
example = gitlab.ProjectBadge("example",
    project=foo.id,
    link_url="https://example.com/badge-123",
    image_url="https://example.com/badge-123.svg")
import * as pulumi from "@pulumi/pulumi";
import * as gitlab from "@pulumi/gitlab";

const foo = new gitlab.Project("foo", {});
const example = new gitlab.ProjectBadge("example", {
    project: foo.id,
    linkUrl: "https://example.com/badge-123",
    imageUrl: "https://example.com/badge-123.svg",
});

Create a ProjectBadge Resource

new ProjectBadge(name: string, args: ProjectBadgeArgs, opts?: CustomResourceOptions);
@overload
def ProjectBadge(resource_name: str,
                 opts: Optional[ResourceOptions] = None,
                 image_url: Optional[str] = None,
                 link_url: Optional[str] = None,
                 project: Optional[str] = None)
@overload
def ProjectBadge(resource_name: str,
                 args: ProjectBadgeArgs,
                 opts: Optional[ResourceOptions] = None)
func NewProjectBadge(ctx *Context, name string, args ProjectBadgeArgs, opts ...ResourceOption) (*ProjectBadge, error)
public ProjectBadge(string name, ProjectBadgeArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args ProjectBadgeArgs
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 ProjectBadgeArgs
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 ProjectBadgeArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args ProjectBadgeArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

ProjectBadge 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 ProjectBadge resource accepts the following input properties:

ImageUrl string
The image url which will be presented on project overview.
LinkUrl string
The url linked with the badge.
Project string
The id of the project to add the badge to.
ImageUrl string
The image url which will be presented on project overview.
LinkUrl string
The url linked with the badge.
Project string
The id of the project to add the badge to.
imageUrl string
The image url which will be presented on project overview.
linkUrl string
The url linked with the badge.
project string
The id of the project to add the badge to.
image_url str
The image url which will be presented on project overview.
link_url str
The url linked with the badge.
project str
The id of the project to add the badge to.

Outputs

All input properties are implicitly available as output properties. Additionally, the ProjectBadge resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
RenderedImageUrl string
The image_url argument rendered (in case of use of placeholders).
RenderedLinkUrl string
The link_url argument rendered (in case of use of placeholders).
Id string
The provider-assigned unique ID for this managed resource.
RenderedImageUrl string
The image_url argument rendered (in case of use of placeholders).
RenderedLinkUrl string
The link_url argument rendered (in case of use of placeholders).
id string
The provider-assigned unique ID for this managed resource.
renderedImageUrl string
The image_url argument rendered (in case of use of placeholders).
renderedLinkUrl string
The link_url argument rendered (in case of use of placeholders).
id str
The provider-assigned unique ID for this managed resource.
rendered_image_url str
The image_url argument rendered (in case of use of placeholders).
rendered_link_url str
The link_url argument rendered (in case of use of placeholders).

Look up an Existing ProjectBadge Resource

Get an existing ProjectBadge 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?: ProjectBadgeState, opts?: CustomResourceOptions): ProjectBadge
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        image_url: Optional[str] = None,
        link_url: Optional[str] = None,
        project: Optional[str] = None,
        rendered_image_url: Optional[str] = None,
        rendered_link_url: Optional[str] = None) -> ProjectBadge
func GetProjectBadge(ctx *Context, name string, id IDInput, state *ProjectBadgeState, opts ...ResourceOption) (*ProjectBadge, error)
public static ProjectBadge Get(string name, Input<string> id, ProjectBadgeState? state, CustomResourceOptions? opts = null)
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.

The following state arguments are supported:

ImageUrl string
The image url which will be presented on project overview.
LinkUrl string
The url linked with the badge.
Project string
The id of the project to add the badge to.
RenderedImageUrl string
The image_url argument rendered (in case of use of placeholders).
RenderedLinkUrl string
The link_url argument rendered (in case of use of placeholders).
ImageUrl string
The image url which will be presented on project overview.
LinkUrl string
The url linked with the badge.
Project string
The id of the project to add the badge to.
RenderedImageUrl string
The image_url argument rendered (in case of use of placeholders).
RenderedLinkUrl string
The link_url argument rendered (in case of use of placeholders).
imageUrl string
The image url which will be presented on project overview.
linkUrl string
The url linked with the badge.
project string
The id of the project to add the badge to.
renderedImageUrl string
The image_url argument rendered (in case of use of placeholders).
renderedLinkUrl string
The link_url argument rendered (in case of use of placeholders).
image_url str
The image url which will be presented on project overview.
link_url str
The url linked with the badge.
project str
The id of the project to add the badge to.
rendered_image_url str
The image_url argument rendered (in case of use of placeholders).
rendered_link_url str
The link_url argument rendered (in case of use of placeholders).

Import

GitLab project badges can be imported using an id made up of {project_id}:{badge_id},

e.g. bash

 $ pulumi import gitlab:index/projectBadge:ProjectBadge foo 1:3

Package Details

Repository
https://github.com/pulumi/pulumi-gitlab
License
Apache-2.0
Notes
This Pulumi package is based on the gitlab Terraform Provider.