github_repository_tag_protection

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

Example Usage

resource "github_repository_tag_protection" "example" {
    repository      = "example-repository"
    pattern         = "v*"
}

Argument Reference

Attributes Reference

The following additional attributes are exported:

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.

$ terraform import github_repository_tag_protection.terraform my-repo/31077