TagProtection

class TagProtection : KotlinCustomResource

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as gitlab from "@pulumi/gitlab";
const tagProtect = new gitlab.TagProtection("TagProtect", {
project: "12345",
tag: "TagProtected",
createAccessLevel: "developer",
allowedToCreates: [
{
userId: 42,
},
{
groupId: 43,
},
],
});
import pulumi
import pulumi_gitlab as gitlab
tag_protect = gitlab.TagProtection("TagProtect",
project="12345",
tag="TagProtected",
create_access_level="developer",
allowed_to_creates=[
{
"user_id": 42,
},
{
"group_id": 43,
},
])
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using GitLab = Pulumi.GitLab;
return await Deployment.RunAsync(() =>
{
var tagProtect = new GitLab.TagProtection("TagProtect", new()
{
Project = "12345",
Tag = "TagProtected",
CreateAccessLevel = "developer",
AllowedToCreates = new[]
{
new GitLab.Inputs.TagProtectionAllowedToCreateArgs
{
UserId = 42,
},
new GitLab.Inputs.TagProtectionAllowedToCreateArgs
{
GroupId = 43,
},
},
});
});
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 {
_, err := gitlab.NewTagProtection(ctx, "TagProtect", &gitlab.TagProtectionArgs{
Project: pulumi.String("12345"),
Tag: pulumi.String("TagProtected"),
CreateAccessLevel: pulumi.String("developer"),
AllowedToCreates: gitlab.TagProtectionAllowedToCreateArray{
&gitlab.TagProtectionAllowedToCreateArgs{
UserId: pulumi.Int(42),
},
&gitlab.TagProtectionAllowedToCreateArgs{
GroupId: pulumi.Int(43),
},
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gitlab.TagProtection;
import com.pulumi.gitlab.TagProtectionArgs;
import com.pulumi.gitlab.inputs.TagProtectionAllowedToCreateArgs;
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) {
var tagProtect = new TagProtection("tagProtect", TagProtectionArgs.builder()
.project("12345")
.tag("TagProtected")
.createAccessLevel("developer")
.allowedToCreates(
TagProtectionAllowedToCreateArgs.builder()
.userId(42)
.build(),
TagProtectionAllowedToCreateArgs.builder()
.groupId(43)
.build())
.build());
}
}
resources:
tagProtect:
type: gitlab:TagProtection
name: TagProtect
properties:
project: '12345'
tag: TagProtected
createAccessLevel: developer
allowedToCreates:
- userId: 42
- groupId: 43

Import

Starting in Terraform v1.5.0 you can use an import block to import gitlab_tag_protection. For example: terraform import { to = gitlab_tag_protection.example id = "see CLI command below for ID" } Import using the CLI is supported using the following syntax: Tag protections can be imported using an id made up of project_id:tag_name, e.g.

$ pulumi import gitlab:index/tagProtection:TagProtection example 123456789:v1.0.0

Properties

Link copied to clipboard

Array of access levels/user(s)/group(s) allowed to create protected tags.

Link copied to clipboard

Access levels allowed to create. Default value of maintainer. The default value is always sent if not provided in the configuration. Valid values are: no one, developer, maintainer.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val project: Output<String>

The id of the project.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val tag: Output<String>

Name of the tag or wildcard.

Link copied to clipboard
val urn: Output<String>