You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I expected the github_issue_labels resource to allow me to specify the full list of issue labels I want, even if those issue labels overlap some of the default ones created in a new GitHub repo, or include other existing labels in the repo.
Actual Behavior
When using github_issue_labels with a set of labels that includes an existing label, the apply fails with an error like:
This makes it impossible to use this resource with a set of labels that includes any of the default labels for new repos. This would be fine if you could simply omit those labels, but if you do, the default labels will be removed on subsequent runs.
Terraform Version
Terraform v1.6.6
on darwin_arm64
+ provider registry.terraform.io/integrations/github v5.43.0
👋 Hey Friends, this issue has been automatically marked as stale because it has no recent activity. It will be closed if no further activity occurs. Please add the Status: Pinned label if you feel that this issue needs to remain open/active. Thank you for your contributions and help in keeping things tidy!
I just ran into this myself; it makes the provider just about useless. We've had to switch to using github_issue_label instead, which while it works means we're now managing individual labels rather than an exclusive set.
I see there's been a pull request in place since October that looks like it addresses the problem; it would be awesome if that could get merged.
Let me chip in. I want to start controlling the labels as well which is pretty much impossible due to the default tags.
Workaround is to either use import or change the organisational labels configuration to manupilate the tags of new repositories so they don't collide.
For a "maintain all labels of a repositories" resource a solution could be to automatically adopt all existing labels automatically and just take full control.
The workaround I'm currently using is to remove the default labels at the organization level, so that new repos created by Terraform get no labels at all. Then I'm free to set whatever labels I want with github_issue_labels.
Activity
github-actions commentedon Oct 15, 2024
👋 Hey Friends, this issue has been automatically marked as
stalebecause it has no recent activity. It will be closed if no further activity occurs. Please add theStatus: Pinnedlabel if you feel that this issue needs to remain open/active. Thank you for your contributions and help in keeping things tidy!ezzatron commentedon Oct 15, 2024
As far as I'm aware this is still an issue.
larsks commentedon Feb 6, 2025
I just ran into this myself; it makes the provider just about useless. We've had to switch to using
github_issue_labelinstead, which while it works means we're now managing individual labels rather than an exclusive set.I see there's been a pull request in place since October that looks like it addresses the problem; it would be awesome if that could get merged.
Thanks @stevehipwell for tackling this.
fatbasstard commentedon Mar 25, 2025
Let me chip in. I want to start controlling the labels as well which is pretty much impossible due to the default tags.
Workaround is to either use
importor change the organisational labels configuration to manupilate the tags of new repositories so they don't collide.For a "maintain all labels of a repositories" resource a solution could be to automatically adopt all existing labels automatically and just take full control.
There are other resources that behave like this, e.g. aws_securityhub_standards_control_association
stevehipwell commentedon Mar 25, 2025
@fatbasstard #2430 fixes this and adds tests (5+ months ago) but hasn't even been acknowledged by the maintainers.
fatbasstard commentedon Mar 25, 2025
@kfcampbell @nickfloyd Do you have any time to take a look at this issue and related PR #2430
1 remaining item
ezzatron commentedon Apr 23, 2025
The workaround I'm currently using is to remove the default labels at the organization level, so that new repos created by Terraform get no labels at all. Then I'm free to set whatever labels I want with
github_issue_labels.Unfortunately this only works for organizations, as far as I know: https://docs.github.com/en/organizations/managing-organization-settings/managing-default-labels-for-repositories-in-your-organization#deleting-a-default-label
JvdsReform commentedon May 19, 2025
Is this fixed? I ran
terraform planand saw that my existing labels were being removed, like the resource should do.esacteksab commentedon May 20, 2025
Yeah, I'm seeing similar behavior. More aligned with expectations. No change in the provider (v6.6.0).
NickLarsenNZ commentedon Nov 11, 2025
I've imported the labels for a repository, but the apply wants to first delete them, and then create them (exactly the same as they are).
Slightly different to the original issue description but could it be related or should I open a new issue?
stevehipwell commentedon Nov 11, 2025
@NickLarsenNZ which provider version and could you please share the output?