Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for github_actions_secret for personal repo #422

Closed
tnguyen14 opened this issue Apr 7, 2020 · 5 comments · Fixed by #520
Closed

Support for github_actions_secret for personal repo #422

tnguyen14 opened this issue Apr 7, 2020 · 5 comments · Fixed by #520

Comments

@tnguyen14
Copy link

Terraform Version

0.12.24

Affected Resource(s)

Please list the resources as a list, for example:

  • github_actions_secret

If this issue appears to affect multiple resources, it may be an issue with Terraform's core, so please mention this.

Terraform Configuration Files

resource "github_actions_secret" "gcp_project" {
  repository = var.github_repo
  secret_name = "GCP_PROJECT"
  plaintext_value = var.gcp_project
}

Expected Behavior

The GitHub Actions Secret is created

Actual Behavior

Error: This resource requires GitHub organization to be set on the provider.  on main.tf line 31, in resource "github_actions_secret" "gcp_project":
  31: resource "github_actions_secret" "gcp_project" {

References

Not sure if this is related to #45

@anGie44
Copy link
Contributor

anGie44 commented Apr 17, 2020

hi @tnguyen14! thank you for creating this issue :) you're correct in tagging this issue to #45 . in continuing off the work done to address these individual vs. org resource management diffs, the linked PR #428 (builds off of #96) now has a change to allow actions secret and public-key data/resource to be made when a provider is set to an individual Github account

@sogaoh
Copy link

sogaoh commented Jul 1, 2020

@anGie44 Please tell me how to create a github_actions_secret of individual Github repository.
I coudn't do it today...

My codes are below: (Sorry in Japanese.)
https://github.com/sogaoh/TerraformPractice/tree/master/VCS/GitHub

@adamnbowen
Copy link

Based on the trail of eventually merged PRs that this issue is linked to, this might have been fixed in version 2.9.0 of the github provider. I haven't tested it out yet though. @sogaoh are you sure you're on 2.9.0 of the Terraform GitHub Provider? If it still isn't working, maybe mentioning that in #501 would help the team out.

@sogaoh
Copy link

sogaoh commented Jul 1, 2020

@adamnbowen Yes. I did on provider.github v2.9.0.

❯ terraform --version
Terraform v0.12.28
+ provider.github v2.9.0

I'll mention on #501 .

@anGie44
Copy link
Contributor

anGie44 commented Jul 1, 2020

hi @sogaoh, thanks for commenting here. apologies my comment from before is outdated. #464 and #465 introduced support for individual repositories but atm, this is only true for resources prefixed with repository. We decided it was best to roll out the individual repo support across batches of related resources instead of update all resources across the provider at once. With this issue, however, we can keep track of the resources still needing support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment