feat: Adding github_organization_ip_allow_list_entry resource#2650
feat: Adding github_organization_ip_allow_list_entry resource#2650ErikElkins wants to merge 2 commits into
Conversation
|
any ETA when this will be released? |
|
any update on this one? |
we're also eagerly awaiting this release -- any update on ETA? |
|
+1 on this |
1 similar comment
|
+1 on this |
| Create: resourceGithubOrganizationIpAllowListEntryCreate, | ||
| Read: resourceGithubOrganizationIpAllowListEntryRead, | ||
| Update: resourceGithubOrganizationIpAllowListEntryUpdate, | ||
| Delete: resourceGithubOrganizationIpAllowListEntryDelete, |
There was a problem hiding this comment.
Please use Context-aware functions here
| Importer: &schema.ResourceImporter{ | ||
| StateContext: schema.ImportStatePassthroughContext, | ||
| }, | ||
|
|
There was a problem hiding this comment.
Please add a top-level Description field
|
|
||
| client := meta.(*Owner).v4client | ||
| orgName := meta.(*Owner).name | ||
| ctx := context.WithValue(context.Background(), ctxId, d.Id()) |
There was a problem hiding this comment.
This is not used
| ctx := context.WithValue(context.Background(), ctxId, d.Id()) |
| PreCheck: func() { | ||
| testAccPreCheckOrg(t) | ||
| }, | ||
| Providers: testAccProviders, |
There was a problem hiding this comment.
| Providers: testAccProviders, | |
| ProviderFactories: providerFactories, |
|
|
||
| resource.Test(t, resource.TestCase{ | ||
| PreCheck: func() { | ||
| testAccPreCheckOrg(t) |
There was a problem hiding this comment.
| testAccPreCheckOrg(t) | |
| skipUnlessHasOrgs(t) |
| provider "github" { | ||
| owner = "%s" | ||
| } | ||
|
|
There was a problem hiding this comment.
The provider comes from the test, it should not be set in the config
| provider "github" { | |
| owner = "%s" | |
| } |
| err := client.Mutate(ctx, &mutation, input, nil) | ||
| if err != nil { | ||
| return err | ||
| } |
There was a problem hiding this comment.
question: Is it possible for this fail with something like a 404?
| return err | ||
| } | ||
|
|
||
| return resourceGithubOrganizationIpAllowListEntryRead(d, meta) |
There was a problem hiding this comment.
There are no Computed fields, this is not necessary
| return resourceGithubOrganizationIpAllowListEntryRead(d, meta) | |
| return nil |
|
|
||
| d.SetId(string(mutation.CreateIpAllowListEntry.IpAllowListEntry.ID)) | ||
|
|
||
| return resourceGithubOrganizationIpAllowListEntryRead(d, meta) |
There was a problem hiding this comment.
There are no Computed fields, this is not necessary
| return resourceGithubOrganizationIpAllowListEntryRead(d, meta) | |
| return nil |
|
Closing this in favor of #3443 |
Resolves #2648
Before the change?
After the change?
github_organization_ip_allow_list_entryresource.Pull request checklist
Does this introduce a breaking change?
Please see our docs on breaking changes to help!