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

New Resource: github_actions_runner_group #821

Merged
merged 12 commits into from
Sep 21, 2021

Conversation

soulshake
Copy link
Contributor

@soulshake soulshake commented Jun 13, 2021

(Disclaimer: this is my first time working on a Terraform provider, and this PR is still a work in progress)

This PR is intended to add support for self-hosted runner groups in GitHub Actions as described in https://docs.github.com/en/rest/reference/actions#self-hosted-runner-groups.

My questions

  1. The docs have a documented parameter visibility which should accept private as an option. But I can't get a runner group with visibility = private through any combination of POST or PATCH calls I've tried (details below). Should I still attempt to add support for this?
  2. The docs do not have a documented allows_public_repositories parameter, but providing this parameter seems to have an effect. Should I add support for this?

1. visibility = private?

I added tests, but the one that tests visibility = true is failing.

Output of failing test for a runner group with `visibility = private`
$ TF_LOG= TF_ACC=1  go test -v   ./... -run ^TestAccGithubActionsRunnerGroup
?   	github.com/terraform-providers/terraform-provider-github	[no test files]
=== RUN   TestAccGithubActionsRunnerGroup_all
=== PAUSE TestAccGithubActionsRunnerGroup_all
=== RUN   TestAccGithubActionsRunnerGroup_private
=== PAUSE TestAccGithubActionsRunnerGroup_private
=== RUN   TestAccGithubActionsRunnerGroup_selected
=== PAUSE TestAccGithubActionsRunnerGroup_selected
=== CONT  TestAccGithubActionsRunnerGroup_all
=== CONT  TestAccGithubActionsRunnerGroup_selected
=== CONT  TestAccGithubActionsRunnerGroup_private
--- PASS: TestAccGithubActionsRunnerGroup_all (10.01s)
=== CONT  TestAccGithubActionsRunnerGroup_private
    testing.go:654: Step 0 error: Check failed: Check 2/2 error: got runnerGroup visibility "all"; want "private"
--- FAIL: TestAccGithubActionsRunnerGroup_private (17.92s)
=== CONT  TestAccGithubActionsRunnerGroup_selected
    testing.go:654: Step 1 error: ImportStateVerify attributes not equivalent. Difference is shown below. Top is actual, bottom is expected.
        
        (map[string]string) {
        }
        
        
        (map[string]string) (len=2) {
         (string) (len=25) "selected_repository_ids.#": (string) (len=1) "1",
         (string) (len=34) "selected_repository_ids.3743502971": (string) (len=9) "376594724"
        }
        
--- FAIL: TestAccGithubActionsRunnerGroup_selected (22.24s)
FAIL
FAIL	github.com/terraform-providers/terraform-provider-github/github	22.249s
FAIL

After testing manually with curl to debug this failing test, I'm confused about the expected behavior of the POST /orgs/{org}/actions/runner-groups method. The API returns a runner group with visibility all, despite specifying "visibility": "private" in the request:

curl -X POST -d '{"visibility": "private", "org": "human-berries", "name": "should be private"}' \
  -H "Authorization: token $GITHUB_TEST_USER_TOKEN"  -H "Accept: application/vnd.github.v3+json" \
  "https://api.github.com/orgs/human-berries/actions/runner-groups"
{
  "id": 124,
  "name": "should be private",
  "visibility": "all",
  "allows_public_repositories": false,
  "default": false,
  "runners_url": "https://api.github.com/orgs/human-berries/actions/runner-groups/124/runners",
  "inherited": false
}

It may be worth mentioning that the dropdown on the web UI only has options for "Selected" and "All" (whether updating a runner group or creating a new runner group):

image

(There is also a checkmark--hidden by the dropdown in the screenshot above--for "Allow public repositories" that is checkable whether "selected" or "all" is chosen from the dropdown.)

Am I missing something?

2. allows_public_repositories parameter?

There is no documented allows_public_repositories parameter (ref), but specifying it seems to be the only way to get a value of allows_public_repositories": true in the create response:

curl -X POST -d '{"visibility": "selected", "allows_public_repositories": true, "name": "allows public repos true", "selected_repository_ids": [376523398, 377751328]}' -H "Authorization: token $GITHUB_TEST_USER_TOKEN"  -H "Accept: application/vnd.github.v3+json"   "https://api.github.com/orgs/human-berries/actions/runner-groups"
{
  "id": 134,
  "name": "allows public repos true",
  "visibility": "selected",
  "allows_public_repositories": true,
  "default": false,
  "selected_repositories_url": "https://api.github.com/orgs/human-berries/actions/runner-groups/134/repositories",
  "runners_url": "https://api.github.com/orgs/human-berries/actions/runner-groups/134/runners",
  "inherited": false
}

curl -X POST -d '{"visibility": "selected", "allows_public_repositories": false, "name": "allows public repos false", "selected_repository_ids": [376523398, 377751328]}' -H "Authorization: token $GITHUB_TEST_USER_TOKEN"  -H "Accept: application/vnd.github.v3+json"   "https://api.github.com/orgs/human-berries/actions/runner-groups"
{
  "id": 135,
  "name": "allows public repos false",
  "visibility": "selected",
  "allows_public_repositories": false,
  "default": false,
  "selected_repositories_url": "https://api.github.com/orgs/human-berries/actions/runner-groups/135/repositories",
  "runners_url": "https://api.github.com/orgs/human-berries/actions/runner-groups/135/runners",
  "inherited": false
}

Related: #542

@soulshake
Copy link
Contributor Author

soulshake commented Jun 17, 2021

Another, more general question: when I try to run any preexisting test that includes the testAccCheckOrganization() check, the test is skipped, despite GITHUB_OWNER being set to an organization:

$ TF_LOG=TRACE TF_ACC=1  go test -v   ./... -run ^TestAccOrganizationBlock_basic
?   	github.com/terraform-providers/terraform-provider-github	[no test files]
=== RUN   TestAccOrganizationBlock_basic
2021/06/17 10:52:31 [ERROR] Github API Request error: &errors.errorString{s:"unsupported protocol scheme \"\""}
2021/06/17 10:52:31 [TRACE] Acquiring lock for GitHub API request (%!q(<nil>))
2021/06/17 10:52:31 [TRACE] Releasing lock for GitHub API request (%!q(<nil>))
    resource_organization_block_test.go:14: Skipping because GITHUB_OWNER "human-berries" is a user, not an organization.
--- SKIP: TestAccOrganizationBlock_basic (0.00s)
PASS
ok  	github.com/terraform-providers/terraform-provider-github/github	(cached)

My GITHUB_TOKEN belongs to an account that belongs to that organization:

curl -s -H "Authorization: token ${GITHUB_TOKEN}" -H "Accept: application/vnd.github.v3+json" https://api.github.com/user/orgs
[
  {
    "login": "human-berries",
    "id": 58956690,
    "node_id": "MDEyOk9yZ2FuaXphdGlvbjU4OTU2Njkw",
    "url": "https://api.github.com/orgs/human-berries",
    "repos_url": "https://api.github.com/orgs/human-berries/repos",
    "events_url": "https://api.github.com/orgs/human-berries/events",
    "hooks_url": "https://api.github.com/orgs/human-berries/hooks",
    "issues_url": "https://api.github.com/orgs/human-berries/issues",
    "members_url": "https://api.github.com/orgs/human-berries/members{/member}",
    "public_members_url": "https://api.github.com/orgs/human-berries/public_members{/member}",
    "avatar_url": "https://avatars.githubusercontent.com/u/58956690?v=4",
    "description": ""
  }
]

And I believe the token has the needed scopes:

$ curl -sI -H "Authorization: token ${GITHUB_TOKEN}" -H "Accept: application/vnd.github.v3+json" https://api.github.com/users/codertocat | grep oauth-scopes
x-oauth-scopes: admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete_repo, repo, user

In case it helps, my env should be configured as described in CONTRIBUTING.md:

$ env| grep GITHUB
GITHUB_TOKEN=ghp_Redacted
GITHUB_ORGANIZATION=human-berries

(Marking as ready for review to request feedback)

@soulshake soulshake marked this pull request as ready for review June 17, 2021 19:33
@raphink
Copy link
Contributor

raphink commented Jun 22, 2021

The visibility = private issue looks like a bug in the API to me (or at least an issue with the documentation).

@jspiro
Copy link
Contributor

jspiro commented Jun 26, 2021

@jcudit could you enable workflows for @soulshake? I recall you saying some tests can only be run by you (?).

@pst
Copy link

pst commented Aug 5, 2021

What is the best way to move this forward and get support for the Actions API into the provider?

@jcudit jcudit added this to the v4.15.0 milestone Aug 9, 2021
@jcudit
Copy link
Contributor

jcudit commented Aug 9, 2021

Apologies for the inactivity here, lets get this ready to ship!

Please cherry-pick b5b793a in order to get the tests aligned to the project's testing suite. I've tested this branch on the latest GHES release as well as with a GHEC account. Functionality seems 👌🏾 for GHEC but we are lacking API support for GHES as of 3.1:

---[ REQUEST ]---------------------------------------
POST /api/v3/orgs/terraformtesting/actions/runner-groups HTTP/1.1
Host: jcudit-1628516972.ghe-test.com
User-Agent: go-github
Content-Length: 48
Accept: application/vnd.github.v3+json
Content-Type: application/json
Accept-Encoding: gzip

{
 "name": "tf-acc-test-e4zrk",
 "visibility": "all"
}

-----------------------------------------------------
2021/08/09 10:41:33 [DEBUG] Github API Response Details:
---[ RESPONSE ]--------------------------------------
HTTP/2.0 404 Not Found
Access-Control-Allow-Origin: *
Access-Control-Expose-Headers: ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, Deprecation, Sunset
Content-Security-Policy: default-src 'none'
Content-Type: application/json; charset=utf-8
Date: Mon, 09 Aug 2021 14:41:33 GMT
Referrer-Policy: origin-when-cross-origin, strict-origin-when-cross-origin
Server: GitHub.com
Strict-Transport-Security: max-age=31536000; includeSubdomains
X-Accepted-Oauth-Scopes: repo
X-Content-Type-Options: nosniff
X-Frame-Options: deny
X-Github-Enterprise-Version: 3.1.4
X-Github-Media-Type: github.v3; format=json
X-Github-Request-Id: 9367b480-ff75-41ba-a46a-1819e252a0a2
X-Oauth-Scopes: admin:enterprise, admin:gpg_key, admin:org, admin:org_hook, admin:pre_receive_hook, admin:public_key, admin:repo_hook, delete:packages, delete_repo, gist, notifications, repo, site_admin, user, workflow, write:discussion, write:packages
X-Runtime-Rack: 0.018059
X-Xss-Protection: 1; mode=block

{
 "message": "Not Found",
 "documentation_url": "https://docs.github.com/enterprise/3.1/rest"
}

As for the visibility configuration, this is the most troublesome bit. Perhaps we can ship this resource with limited support and revisit setting visibility to private once the API has better options for us.

We will also need to add docs for the new resource before this can merge. Adding these will allow us to communicate limitations around GHES use and the private setting.

@soulshake soulshake force-pushed the organization_runner_group branch from f89cd45 to da349c1 Compare August 18, 2021 07:21
@soulshake
Copy link
Contributor Author

soulshake commented Aug 18, 2021

@jcudit Thanks! I've added docs and a few more tests. Please let me know if this is what you had in mind. The tests seem to be passing:

Test output
$ TF_LOG= TF_ACC=1  go test -v   ./... -run ^TestAccGithubActionsRunnerGroup
?   	github.com/terraform-providers/terraform-provider-github	[no test files]
=== RUN   TestAccGithubActionsRunnerGroup
=== RUN   TestAccGithubActionsRunnerGroup/creates_runner_groups_without_error
=== RUN   TestAccGithubActionsRunnerGroup/creates_runner_groups_without_error/with_an_anonymous_account
    resource_github_actions_runner_group_test.go:56: anonymous account not supported for this operation
=== RUN   TestAccGithubActionsRunnerGroup/creates_runner_groups_without_error/with_an_individual_account
    resource_github_actions_runner_group_test.go:60: individual account not supported for this operation
=== RUN   TestAccGithubActionsRunnerGroup/creates_runner_groups_without_error/with_an_organization_account
=== RUN   TestAccGithubActionsRunnerGroup/manages_runner_visibility
=== RUN   TestAccGithubActionsRunnerGroup/manages_runner_visibility/with_an_anonymous_account
    resource_github_actions_runner_group_test.go:115: anonymous account not supported for this operation
=== RUN   TestAccGithubActionsRunnerGroup/manages_runner_visibility/with_an_individual_account
    resource_github_actions_runner_group_test.go:119: individual account not supported for this operation
=== RUN   TestAccGithubActionsRunnerGroup/manages_runner_visibility/with_an_organization_account
=== RUN   TestAccGithubActionsRunnerGroup/imports_an_all_runner_group_without_error
=== RUN   TestAccGithubActionsRunnerGroup/imports_an_all_runner_group_without_error/with_an_anonymous_account
    resource_github_actions_runner_group_test.go:164: anonymous account not supported for this operation
=== RUN   TestAccGithubActionsRunnerGroup/imports_an_all_runner_group_without_error/with_an_individual_account
    resource_github_actions_runner_group_test.go:168: individual account not supported for this operation
=== RUN   TestAccGithubActionsRunnerGroup/imports_an_all_runner_group_without_error/with_an_organization_account
=== RUN   TestAccGithubActionsRunnerGroup/imports_a_private_runner_group_without_error
=== RUN   TestAccGithubActionsRunnerGroup/imports_a_private_runner_group_without_error/with_an_anonymous_account
    resource_github_actions_runner_group_test.go:213: anonymous account not supported for this operation
=== RUN   TestAccGithubActionsRunnerGroup/imports_a_private_runner_group_without_error/with_an_individual_account
    resource_github_actions_runner_group_test.go:217: individual account not supported for this operation
=== RUN   TestAccGithubActionsRunnerGroup/imports_a_private_runner_group_without_error/with_an_organization_account
    resource_github_actions_runner_group_test.go:224: always shows a diff for visibility 'all' => 'private'
=== RUN   TestAccGithubActionsRunnerGroup/imports_a_selected_runner_group_without_error
=== RUN   TestAccGithubActionsRunnerGroup/imports_a_selected_runner_group_without_error/with_an_individual_account
    provider_utils.go:55: GITHUB_TOKEN and GITHUB_OWNER environment variables should be set
    provider_utils.go:65: Skipping TestAccGithubActionsRunnerGroup/imports_a_selected_runner_group_without_error/with_an_individual_account which requires individual mode
=== RUN   TestAccGithubActionsRunnerGroup/imports_a_selected_runner_group_without_error/with_an_organization_account
--- PASS: TestAccGithubActionsRunnerGroup (42.13s)
    --- PASS: TestAccGithubActionsRunnerGroup/creates_runner_groups_without_error (10.63s)
        --- SKIP: TestAccGithubActionsRunnerGroup/creates_runner_groups_without_error/with_an_anonymous_account (0.00s)
        --- SKIP: TestAccGithubActionsRunnerGroup/creates_runner_groups_without_error/with_an_individual_account (0.00s)
        --- PASS: TestAccGithubActionsRunnerGroup/creates_runner_groups_without_error/with_an_organization_account (10.63s)
    --- PASS: TestAccGithubActionsRunnerGroup/manages_runner_visibility (10.14s)
        --- SKIP: TestAccGithubActionsRunnerGroup/manages_runner_visibility/with_an_anonymous_account (0.00s)
        --- SKIP: TestAccGithubActionsRunnerGroup/manages_runner_visibility/with_an_individual_account (0.00s)
        --- PASS: TestAccGithubActionsRunnerGroup/manages_runner_visibility/with_an_organization_account (10.14s)
    --- PASS: TestAccGithubActionsRunnerGroup/imports_an_all_runner_group_without_error (10.66s)
        --- SKIP: TestAccGithubActionsRunnerGroup/imports_an_all_runner_group_without_error/with_an_anonymous_account (0.00s)
        --- SKIP: TestAccGithubActionsRunnerGroup/imports_an_all_runner_group_without_error/with_an_individual_account (0.00s)
        --- PASS: TestAccGithubActionsRunnerGroup/imports_an_all_runner_group_without_error/with_an_organization_account (10.66s)
    --- PASS: TestAccGithubActionsRunnerGroup/imports_a_private_runner_group_without_error (0.00s)
        --- SKIP: TestAccGithubActionsRunnerGroup/imports_a_private_runner_group_without_error/with_an_anonymous_account (0.00s)
        --- SKIP: TestAccGithubActionsRunnerGroup/imports_a_private_runner_group_without_error/with_an_individual_account (0.00s)
        --- SKIP: TestAccGithubActionsRunnerGroup/imports_a_private_runner_group_without_error/with_an_organization_account (0.00s)
    --- PASS: TestAccGithubActionsRunnerGroup/imports_a_selected_runner_group_without_error (10.70s)
        --- SKIP: TestAccGithubActionsRunnerGroup/imports_a_selected_runner_group_without_error/with_an_individual_account (0.00s)
        --- PASS: TestAccGithubActionsRunnerGroup/imports_a_selected_runner_group_without_error/with_an_organization_account (10.70s)
PASS
ok  	github.com/terraform-providers/terraform-provider-github/github	42.147s

However, I haven't been able to actually test the provider locally; not sure what I'm doing wrong:

Attempt at using built provider
aj@zagreb ~/git/beacon/tmp/terraform-provider-github
$ go build -o ~/go/bin/

aj@zagreb ~/git/beacon/tmp/terraform-provider-github
$ cd examples/runner_group/

aj@zagreb ~/git/beacon/tmp/terraform-provider-github/examples/runner_group
$ cat $TF_CLI_CONFIG_FILE
provider_installation {
  dev_overrides {
    "integrations/github" = "~/go/bin/"
  }

  direct {}
}
aj@zagreb ~/git/beacon/tmp/terraform-provider-github/examples/runner_group
$ terraform init

Initializing the backend...

Initializing provider plugins...
- Reusing previous version of hashicorp/github from the dependency lock file
- Using previously-installed hashicorp/github v4.12.0

╷
│ Warning: Provider development overrides are in effect
│ 
│ The following provider development overrides are set in the CLI configuration:
│  - integrations/github in ~/go/bin
│ 
│ Skip terraform init when using provider development overrides. It is not necessary and may error unexpectedly.
╵

╷
│ Warning: Additional provider information from registry
│ 
│ The remote registry returned warnings for registry.terraform.io/hashicorp/github:
│ - For users on Terraform 0.13 or greater, this provider has moved to integrations/github. Please update your source in required_providers.
╵

Terraform has been successfully initialized!

You may now begin working with Terraform. Try running "terraform plan" to see
any changes that are required for your infrastructure. All Terraform commands
should now work.

If you ever set or change modules or backend configuration for Terraform,
rerun this command to reinitialize your working directory. If you forget, other
commands will detect it and remind you to do so if necessary.

aj@zagreb ~/git/beacon/tmp/terraform-provider-github/examples/runner_group on organization_runner_group [none@] default (proj⎈default) 
$ terraform plan
╷
│ Warning: Provider development overrides are in effect
│ 
│ The following provider development overrides are set in the CLI configuration:
│  - integrations/github in ~/go/bin
│ 
│ The behavior may therefore not match any released version of the provider and applying changes may cause the state to become incompatible with published releases.
╵
╷
│ Warning: "organization": [DEPRECATED] Use owner (or GITHUB_OWNER) instead of organization (or GITHUB_ORGANIZATION)
│ 
│   with provider["registry.terraform.io/hashicorp/github"],
│   on providers.tf line 1, in provider "github":
│    1: provider "github" {
│ 
╵
╷
│ Error: Invalid resource type
│ 
│   on main.tf line 1, in resource "github_actions_runner_group" "test_all":
│    1: resource "github_actions_runner_group" "test_all" {
│ 
│ The provider hashicorp/github does not support resource type "github_actions_runner_group".
╵
╷
│ Error: Invalid resource type
│ 
│   on main.tf line 6, in resource "github_actions_runner_group" "test_private":
│    6: resource "github_actions_runner_group" "test_private" {
│ 
│ The provider hashicorp/github does not support resource type "github_actions_runner_group".
╵
╷
│ Error: Invalid resource type
│ 
│   on main.tf line 11, in resource "github_actions_runner_group" "test_selected":
│   11: resource "github_actions_runner_group" "test_selected" {
│ 
│ The provider hashicorp/github does not support resource type "github_actions_runner_group".
╵
After adding required_providers block
aj@zagreb ~/git/beacon/tmp/terraform-provider-github/examples/runner_group on organization_runner_group
$ cat providers.tf 
terraform {
  required_providers {
    github = {
      source  = "integrations/github"
      version = "4.13.0"
    }
  }
}

provider "github" {
  organization = var.organization
  token        = var.github_token
}

aj@zagreb ~/git/beacon/tmp/terraform-provider-github/examples/runner_group on organization_runner_group
$ terraform init -upgrade -reconfigure

Initializing the backend...

Initializing provider plugins...
- Finding integrations/github versions matching "4.13.0"...
- Using previously-installed integrations/github v4.13.0

╷
│ Warning: Provider development overrides are in effect
│ 
│ The following provider development overrides are set in the CLI configuration:
│  - integrations/github in ~/go/bin
│ 
│ Skip terraform init when using provider development overrides. It is not necessary and may error unexpectedly.
╵

Terraform has been successfully initialized!

You may now begin working with Terraform. Try running "terraform plan" to see
any changes that are required for your infrastructure. All Terraform commands
should now work.

If you ever set or change modules or backend configuration for Terraform,
rerun this command to reinitialize your working directory. If you forget, other
commands will detect it and remind you to do so if necessary.

aj@zagreb ~/git/beacon/tmp/terraform-provider-github/examples/runner_group on organization_runner_group
$ terraform plan
╷
│ Warning: Provider development overrides are in effect
│ 
│ The following provider development overrides are set in the CLI configuration:
│  - integrations/github in ~/go/bin
│ 
│ The behavior may therefore not match any released version of the provider and applying changes may cause the state to become incompatible with published releases.
╵
╷
│ Error: Could not load plugin
│ 
│ 
│ Plugin reinitialization required. Please run "terraform init".
│ 
│ Plugins are external binaries that Terraform uses to access and manipulate
│ resources. The configuration provided requires plugins which can't be located,
│ don't satisfy the version constraints, or are otherwise incompatible.
│ 
│ Terraform automatically discovers provider requirements from your
│ configuration, including providers used in child modules. To see the
│ requirements and constraints, run "terraform providers".
│ 
│ failed to instantiate provider "registry.terraform.io/integrations/github" to obtain schema: could not read package directory: open ~/go/bin: no such file or directory
│ 
╵

Comment on lines 171 to 179
log.Printf("[DEBUG] Reading organization runner group repositories: %s (%s)", d.Id(), orgName)
runnerGroupRepositories, resp, err := client.Actions.ListRepositoryAccessRunnerGroup(ctx, orgName, runnerGroupID)

selectedRepositoryIDs := []int64{}
for _, repo := range runnerGroupRepositories.Repositories {
selectedRepositoryIDs = append(selectedRepositoryIDs, *repo.ID)
}
log.Printf("[DEBUG] Got selected_repository_ids: %v", selectedRepositoryIDs)
d.Set("selected_repository_ids", selectedRepositoryIDs)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did not see a way to get the selected_repository_ids without making this additional API call.


t.Run("creates runner groups without error", func(t *testing.T) {

// t.Skip("requires an enterprise cloud account")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the tests don't run when this line is present, I wasn't sure if it should be there or not.

Comment on lines +224 to +234
t.Skip("always shows a diff for visibility 'all' => 'private'")
testCase(t, organization)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wasn't sure if I should leave this test here or take it out entirely.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Safe to leave in for this first pass. We may upgrade our testing suite and revisit in the future 🤞🏾

@jcudit jcudit modified the milestones: v4.15.0, v4.14.0 Aug 31, 2021
Copy link
Contributor

@jcudit jcudit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is pretty close and will likely ship with the next release. Can we get 5ec99a3 cherry-picked in to finalize documentation?

Aiming to play more with the test suite against different versions of enterprise deployments. Hoping to get limitations documented and flush out any obvious bugs.

Excellent effort 🙇🏾 !

@jcudit jcudit modified the milestones: v4.14.0, v4.15.0 Sep 2, 2021
@soulshake soulshake force-pushed the organization_runner_group branch from 3dc6c65 to edfd706 Compare September 2, 2021 14:33
@soulshake
Copy link
Contributor Author

@jcudit cherry-pick has been done, thank you!

Copy link
Contributor

@jcudit jcudit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small fix required but otherwise tested well for enterprise use too. Good to merge once the import has been fixed.

github/resource_github_actions_runner_group.go Outdated Show resolved Hide resolved
@soulshake
Copy link
Contributor Author

@jcudit Suggestion merged 👍 Thanks!

@jcudit
Copy link
Contributor

jcudit commented Sep 13, 2021

Ah, one more round of fixes 🙃

Can we get the conflicts removed here as another PR was merged that added a new resource.

@soulshake soulshake force-pushed the organization_runner_group branch from a96f4dd to 320ddb3 Compare September 13, 2021 17:13
@soulshake
Copy link
Contributor Author

Ah, one more round of fixes

Can we get the conflicts removed here as another PR was merged that added a new resource.

Of course! Done and done

@jcudit jcudit merged commit 6b52c47 into integrations:main Sep 21, 2021
kfcampbell pushed a commit to kfcampbell/terraform-provider-github that referenced this pull request Jul 26, 2022
* WIP

* fixup! add tests compatible with test suite

* Add doc

* Set selected_repository_ids

* Add import tests

* Add note to docs regarding unsupported `visibility = private`

* Add check for selected_repository_ids.# when importing a 'selected' runner group

* Add a few more name checks

* fixup! link new resource documentation

* Update github/resource_github_actions_runner_group.go

Co-authored-by: Jeremy Udit <[email protected]>

* fixup! handle error to satisfy linter

* fixup! discard unused return value

Co-authored-by: Jeremy Udit <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants