Skip to content

Commit f3640e6

Browse files
authored
Update github_organization_settings to only need RO permissions at plan time (#1321)
1 parent 05a8875 commit f3640e6

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

github/provider.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ func Provider() terraform.ResourceProvider {
109109
"github_membership": resourceGithubMembership(),
110110
"github_organization_block": resourceOrganizationBlock(),
111111
"github_organization_project": resourceGithubOrganizationProject(),
112-
"github_organization_settings": resouceGithubOrganizationSettings(),
112+
"github_organization_settings": resourceGithubOrganizationSettings(),
113113
"github_organization_webhook": resourceGithubOrganizationWebhook(),
114114
"github_project_card": resourceGithubProjectCard(),
115115
"github_project_column": resourceGithubProjectColumn(),

github/resource_github_organization_settings.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
"github.com/hashicorp/terraform-plugin-sdk/helper/validation"
1111
)
1212

13-
func resouceGithubOrganizationSettings() *schema.Resource {
13+
func resourceGithubOrganizationSettings() *schema.Resource {
1414
return &schema.Resource{
1515
Create: resourceGithubOrganizationSettingsCreateOrUpdate,
1616
Read: resourceGithubOrganizationSettingsRead,
@@ -246,7 +246,7 @@ func resourceGithubOrganizationSettingsRead(d *schema.ResourceData, meta interfa
246246
ctx := context.Background()
247247
org := meta.(*Owner).name
248248

249-
orgSettings, _, err := client.Organizations.Edit(ctx, org, nil)
249+
orgSettings, _, err := client.Organizations.Get(ctx, org)
250250
if err != nil {
251251
return err
252252
}

0 commit comments

Comments
 (0)