Tag Protection Args
data class TagProtectionArgs(val allowedToCreates: Output<List<TagProtectionAllowedToCreateArgs>>? = null, val createAccessLevel: Output<String>? = null, val project: Output<String>? = null, val tag: Output<String>? = null) : ConvertibleToJava<TagProtectionArgs>
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,
},
],
});Content copied to clipboard
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,
},
])Content copied to clipboard
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,
},
},
});
});Content copied to clipboard
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
})
}Content copied to clipboard
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());
}
}Content copied to clipboard
resources:
tagProtect:
type: gitlab:TagProtection
name: TagProtect
properties:
project: '12345'
tag: TagProtected
createAccessLevel: developer
allowedToCreates:
- userId: 42
- groupId: 43Content copied to clipboard
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.0Content copied to clipboard
Constructors
Link copied to clipboard
constructor(allowedToCreates: Output<List<TagProtectionAllowedToCreateArgs>>? = null, createAccessLevel: Output<String>? = null, project: Output<String>? = null, tag: Output<String>? = null)
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.