TagProtection

# gitlab_tag_protection

This resource allows you to protect a specific tag or wildcard by an access level so that the user with less access level cannot Create the tags.

Example Usage

using Pulumi;
using GitLab = Pulumi.GitLab;

class MyStack : Stack
{
    public MyStack()
    {
        var tagProtect = new GitLab.TagProtection("tagProtect", new GitLab.TagProtectionArgs
        {
            CreateAccessLevel = "developer",
            Project = "12345",
            Tag = "TagProtected",
        });
    }

}
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 {
		_, err := gitlab.NewTagProtection(ctx, "tagProtect", &gitlab.TagProtectionArgs{
			CreateAccessLevel: pulumi.String("developer"),
			Project:           pulumi.String("12345"),
			Tag:               pulumi.String("TagProtected"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
import pulumi
import pulumi_gitlab as gitlab

tag_protect = gitlab.TagProtection("tagProtect",
    create_access_level="developer",
    project="12345",
    tag="TagProtected")
import * as pulumi from "@pulumi/pulumi";
import * as gitlab from "@pulumi/gitlab";

const tagProtect = new gitlab.TagProtection("TagProtect", {
    createAccessLevel: "developer",
    project: "12345",
    tag: "TagProtected",
});

Create a TagProtection Resource

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

TagProtection Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The TagProtection resource accepts the following input properties:

CreateAccessLevel string
One of five levels of access to the project.
Project string
The id of the project.
Tag string
Name of the tag or wildcard.
CreateAccessLevel string
One of five levels of access to the project.
Project string
The id of the project.
Tag string
Name of the tag or wildcard.
createAccessLevel string
One of five levels of access to the project.
project string
The id of the project.
tag string
Name of the tag or wildcard.
create_access_level str
One of five levels of access to the project.
project str
The id of the project.
tag str
Name of the tag or wildcard.

Outputs

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

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.

Look up an Existing TagProtection Resource

Get an existing TagProtection 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?: TagProtectionState, opts?: CustomResourceOptions): TagProtection
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        create_access_level: Optional[str] = None,
        project: Optional[str] = None,
        tag: Optional[str] = None) -> TagProtection
func GetTagProtection(ctx *Context, name string, id IDInput, state *TagProtectionState, opts ...ResourceOption) (*TagProtection, error)
public static TagProtection Get(string name, Input<string> id, TagProtectionState? 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:

CreateAccessLevel string
One of five levels of access to the project.
Project string
The id of the project.
Tag string
Name of the tag or wildcard.
CreateAccessLevel string
One of five levels of access to the project.
Project string
The id of the project.
Tag string
Name of the tag or wildcard.
createAccessLevel string
One of five levels of access to the project.
project string
The id of the project.
tag string
Name of the tag or wildcard.
create_access_level str
One of five levels of access to the project.
project str
The id of the project.
tag str
Name of the tag or wildcard.

Package Details

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