Repository navigation
Closed
Labels
Type: FeatureNew feature or request
Milestone
Description
Terraform Version
Terraform Version: 0.12.28
Provider Version: 2.9.0
Affected Resource(s)
github_branchgithub_issue_label- probably others that I don't use as much
Terraform Configuration Files
resource "github_branch" "branch" {
for_each = toset(local.branches)
repository = github_repository.repo.name
branch = each.value
source_branch = var.source_branch
lifecycle {
ignore_changes = [branch, source_branch]
create_before_destroy = true
}
}
resource "github_issue_label" "label" {
for_each = var.labels
repository = github_repository.repo.name
name = each.key
color = each.value
}Debug Output
Setting debugging seems to yield any separate results from running w/out debugging.
Panic Output
No panic output.
Expected Behavior
Terraform should've had no problems creating GitHub branches and labels on repositories that are owned by a GitHub user.
Actual Behavior
Terraform erred with the following:
Error: This resource can only be used in the context of an organization, "foobar" is a user.
on ../tf-library/label.tf line 1, in resource "github_issue_label" "label":
1: resource "github_issue_label" "label" {
Error: This resource can only be used in the context of an organization, "foobar" is a user.
on ../tf-library/branch.tf line 6, in resource "github_branch" "branch":
6: resource "github_branch" "branch" {Steps to Reproduce
Please list the steps required to reproduce the issue, for example:
- Use provider version 2.9.0 and specify a GitHub user as the owner
- Codify creating a new GH branch for a repository the GH user owns
- Codify creating a new label for a repository the GH user owns
- Run
terraform init - Run
terraform apply - See errors
Important Factoids
None that I can think of.
References
Reacted by Russell Boley, Joachim Lavalette, Kyler Middleton and Brian A. Teller
Reacted by Jeremy Udit, James Lucktaylor, Joachim Lavalette and Brian A. Teller
Metadata
Metadata
Assignees
Labels
Type: FeatureNew feature or request
Activity
anGie44 commentedon Jun 29, 2020
hi @emmasax4, thank you for creating this issue! as of v2.9.0 only the resources listed in the description of #465 , a subset of resources prefixed with
repository, have support for individual user accounts as we decided to roll-out user level support in batches since this is a relatively large change in the provider. apologies the PR does not make it super clear! unfortunately this does not includebranchandissue_labelbut with this issue we can keep track of areas still needing support :)emmahsax commentedon Jun 29, 2020
Ah okay sounds good. I will keep an eye out on future versions of the provider for
branchandissue_labelthen!jcudit commentedon Jul 1, 2020
Aiming to tackle one or both of these resources in an upcoming release to mop up issues with
v2.9.0. Thanks for raising this.sogaoh commentedon Jul 1, 2020
@anGie44 @jcudit
From https://github.com/terraform-providers/terraform-provider-github/issues/422#issuecomment-652455877
I couldn't create a github_actions_secret of individual Github repository similarly on
v2.9.0.Could you please correspond in
v2.9.1?emmahsax commentedon Jul 16, 2020
@anGie44 @jcudit According to this (https://github.com/terraform-providers/terraform-provider-github/blob/master/CHANGELOG.md#291-july-01-2020) it looks like the ability to use
github_repositorywith user individual repos was reverted? And that those changes will be made in the next major release, along with, I'm assuming, the issues I brought up in this Issue?Is that an accurate assumption?
frezbo commentedon Aug 8, 2020
This is really confusing with the revert that happened, I had to look at code changes and CHANGELOG to figure out why it was not working for personal repositories. For now I switched to provider version
2.9.0. Do we have a time line for the major release?jcudit commentedon Aug 13, 2020
Apologies for the mixup there @frezbo, definitely confusing 🙃
As for the next major release a couple of items are blocking:
Given available bandwidth, my hope is that the release will ship sometime between September and October.
dvargasfuertes commentedon Aug 27, 2020
Is there anything blocking further review of that PR? anything I could do to help? Context is that I'm blocked from using github action secret resources with a non organization account
jcudit commentedon Sep 4, 2020
@dvargas92495 changes to unblock you (🤞) are now merged into the default branch. Any chance you can test this out?
A new release will likely land mid next week.
dvargasfuertes commentedon Sep 4, 2020
I would love to test this out! Let me know when it's ready!
dvargasfuertes commentedon Sep 10, 2020
This appears to be working for me!
frezbo commentedon Sep 11, 2020
yeh, this seems to be fixed in the
3.0.0release.emmahsax commentedon Sep 11, 2020
According to this page,
3.0.0isn't released yet?frezbo commentedon Sep 11, 2020
@emmasax4 it's released: https://github.com/terraform-providers/terraform-provider-github/releases/tag/v3.0.0
emmahsax commentedon Sep 14, 2020
Apparently
github_branch_protectionis still not yet available for individual users:Perhaps it's planned for this resource to be added in a future release? @jcudit perhaps knows something?
jcudit commentedon Sep 14, 2020
We revamped the branch protection resource and the changes should be landing in v3.1.0.
jcudit commentedon Oct 4, 2020
I believe this is complete and will be released this week. Please re-open if I've misunderstood.
emmahsax commentedon Oct 10, 2020
Apparently, as of 2020-10-10, version 3.1.0 is not yet released. Do we know what day this is planning to be released?
srobinson commentedon Jan 27, 2023
This message also appears if your github token has expired. Just FYI and hope it saves someone some time.
nakamura0907 commentedon Jan 6, 2024
Docs overview | integrations/github | Terraform | Terraform Registry