Provides GitHub issue labels resource.
This resource allows you to create and manage issue labels within your GitHub organization.
This resource is authoritative. For adding a label to a repo in a non-authoritative manner, use github_issue_label instead.
If you change the case of a label's name, its' color, or description, this resource will edit the existing label to match the new values. However, if you change the name of a label, this resource will create a new label with the new name and delete the old label. Beware that this will remove the label from any issues it was previously attached to.
# Create a new, red colored label
resource "github_issue_labels" "test_repo" {
repository = "test-repo"
label {
name = "Urgent"
color = "FF0000"
}
label {
name = "Critical"
color = "FF0000"
}
}
The following arguments are supported:
repository
- (Required) The GitHub repository
name
- (Required) The name of the label.
color
- (Required) A 6 character hex code, without the leading #, identifying the color of the label.
description
- (Optional) A short description of the label.
url
- (Computed) The URL to the issue label
GitHub Issue Labels can be imported using the repository name
, e.g.
$ terraform import github_issue_labels.test_repo test_repo