Skip to content

feat: Adding github_organization_ip_allow_list_entry resource#2650

Closed
ErikElkins wants to merge 2 commits into
integrations:mainfrom
ErikElkins:feat/org-ip-allow-list
Closed

feat: Adding github_organization_ip_allow_list_entry resource#2650
ErikElkins wants to merge 2 commits into
integrations:mainfrom
ErikElkins:feat/org-ip-allow-list

Conversation

@ErikElkins

Copy link
Copy Markdown
Contributor

Resolves #2648


Before the change?

  • None

After the change?

  • Adding the github_organization_ip_allow_list_entry resource.

Pull request checklist

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been reviewed and added / updated if needed (for bug fixes / features)

Does this introduce a breaking change?

Please see our docs on breaking changes to help!

  • Yes
  • No

@gkumarchilakala

Copy link
Copy Markdown

any ETA when this will be released?

@nickfloyd nickfloyd moved this from 🆕 Triage to 👀 In review in 🧰 Octokit Active Jun 3, 2025
@dug42

dug42 commented Jul 24, 2025

Copy link
Copy Markdown

any update on this one?

@dominicsperring

Copy link
Copy Markdown

any ETA when this will be released?

we're also eagerly awaiting this release -- any update on ETA?

@ErikElkins ErikElkins changed the title Adding github_organization_ip_allow_list_entry resource feat: Adding github_organization_ip_allow_list_entry resource Oct 25, 2025
@the-mentor

Copy link
Copy Markdown

+1 on this

1 similar comment
@nicolas-fidel-wmx

Copy link
Copy Markdown

+1 on this

Comment on lines +14 to +17
Create: resourceGithubOrganizationIpAllowListEntryCreate,
Read: resourceGithubOrganizationIpAllowListEntryRead,
Update: resourceGithubOrganizationIpAllowListEntryUpdate,
Delete: resourceGithubOrganizationIpAllowListEntryDelete,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Please use Context-aware functions here

Importer: &schema.ResourceImporter{
StateContext: schema.ImportStatePassthroughContext,
},

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Please add a top-level Description field


client := meta.(*Owner).v4client
orgName := meta.(*Owner).name
ctx := context.WithValue(context.Background(), ctxId, d.Id())

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This is not used

Suggested change
ctx := context.WithValue(context.Background(), ctxId, d.Id())

PreCheck: func() {
testAccPreCheckOrg(t)
},
Providers: testAccProviders,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
Providers: testAccProviders,
ProviderFactories: providerFactories,


resource.Test(t, resource.TestCase{
PreCheck: func() {
testAccPreCheckOrg(t)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
testAccPreCheckOrg(t)
skipUnlessHasOrgs(t)

Comment on lines +83 to +86
provider "github" {
owner = "%s"
}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The provider comes from the test, it should not be set in the config

Suggested change
provider "github" {
owner = "%s"
}

Comment on lines +190 to +193
err := client.Mutate(ctx, &mutation, input, nil)
if err != nil {
return err
}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

question: Is it possible for this fail with something like a 404?

return err
}

return resourceGithubOrganizationIpAllowListEntryRead(d, meta)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

There are no Computed fields, this is not necessary

Suggested change
return resourceGithubOrganizationIpAllowListEntryRead(d, meta)
return nil


d.SetId(string(mutation.CreateIpAllowListEntry.IpAllowListEntry.ID))

return resourceGithubOrganizationIpAllowListEntryRead(d, meta)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

There are no Computed fields, this is not necessary

Suggested change
return resourceGithubOrganizationIpAllowListEntryRead(d, meta)
return nil

@github-project-automation github-project-automation Bot moved this from 👀 In review to 🏗 In progress in 🧰 Octokit Active Jan 17, 2026
@ErikElkins

Copy link
Copy Markdown
Contributor Author

Closing this in favor of #3443

@ErikElkins ErikElkins closed this Jun 30, 2026
@github-project-automation github-project-automation Bot moved this from 🏗 In progress to ✅ Done in 🧰 Octokit Active Jun 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEAT]: IP Allow Lists for enterprises and organizations

9 participants