Skip to content

Support for github_actions_secret for personal repo #422

Closed

Description

@tnguyen14

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

Activity

  1. anGie44 commented on Apr 17, 2020

    @anGie44
    Collaborator

    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

  2. sogaoh commented on Jul 1, 2020

    @sogaoh

    @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

  3. adamnbowen commented on Jul 1, 2020

    @adamnbowen

    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.

  4. sogaoh commented on Jul 1, 2020

    @sogaoh

    @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 .

  5. anGie44 commented on Jul 1, 2020

    @anGie44
    Collaborator

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions