RepositoryTagProtection

class RepositoryTagProtection : KotlinCustomResource

This resource allows you to create and manage a repository tag protection for repositories within your GitHub organization or personal account.

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.github.RepositoryTagProtection;
import com.pulumi.github.RepositoryTagProtectionArgs;
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 example = new RepositoryTagProtection("example", RepositoryTagProtectionArgs.builder()
.pattern("v*")
.repository("example-repository")
.build());
}
}

Import

Repository tag protections can be imported using the name of the repository, combined with the id of the tag protection, separated by a / character. The id of the tag protection can be found using the GitHub API. Importing uses the name of the repository, as well as the ID of the tag protection, e.g.

$ pulumi import github:index/repositoryTagProtection:RepositoryTagProtection terraform my-repo/31077

Properties

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

The pattern of the tag to protect.

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

Name of the repository to add the tag protection to.

Link copied to clipboard
val tagProtectionId: Output<Int>

The ID of the tag protection.

Link copied to clipboard
val urn: Output<String>