Skip to content
This repository was archived by the owner on Apr 15, 2026. It is now read-only.

Commit c4a584b

Browse files
committed
fix(scim): use buildTwoPartID for data source IDs
Squash merge of enterprise-scim branch. Resolves conflict by taking the buildTwoPartID version (removing fmt.Sprintf and unused fmt import) from fix/53-scim-buildtwopartid. Closes #53
1 parent c450dd2 commit c4a584b

4 files changed

Lines changed: 2 additions & 68 deletions

File tree

github/data_source_github_enterprise_scim_group.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package github
22

33
import (
44
"context"
5-
"fmt"
65

76
"github.com/hashicorp/terraform-plugin-sdk/v2/diag"
87
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
@@ -39,7 +38,7 @@ func dataSourceGithubEnterpriseSCIMGroupRead(ctx context.Context, d *schema.Reso
3938
return diag.FromErr(err)
4039
}
4140

42-
d.SetId(fmt.Sprintf("%s/%s", enterprise, scimGroupID))
41+
d.SetId(buildTwoPartID(enterprise, scimGroupID))
4342

4443
if err := d.Set("schemas", group.Schemas); err != nil {
4544
return diag.FromErr(err)

github/data_source_github_enterprise_scim_user.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package github
22

33
import (
44
"context"
5-
"fmt"
65

76
"github.com/hashicorp/terraform-plugin-sdk/v2/diag"
87
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
@@ -39,7 +38,7 @@ func dataSourceGithubEnterpriseSCIMUserRead(ctx context.Context, d *schema.Resou
3938
return diag.FromErr(err)
4039
}
4140

42-
d.SetId(fmt.Sprintf("%s/%s", enterprise, scimUserID))
41+
d.SetId(buildTwoPartID(enterprise, scimUserID))
4342

4443
if err := d.Set("schemas", user.Schemas); err != nil {
4544
return diag.FromErr(err)

github/provider.go

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -213,17 +213,10 @@ func Provider() *schema.Provider {
213213
"github_user_invitation_accepter": resourceGithubUserInvitationAccepter(),
214214
"github_user_ssh_key": resourceGithubUserSshKey(),
215215
"github_enterprise_organization": resourceGithubEnterpriseOrganization(),
216-
"github_enterprise_team": resourceGithubEnterpriseTeam(),
217-
"github_enterprise_team_membership": resourceGithubEnterpriseTeamMembership(),
218-
"github_enterprise_team_organizations": resourceGithubEnterpriseTeamOrganizations(),
219216
"github_enterprise_actions_runner_group": resourceGithubActionsEnterpriseRunnerGroup(),
220217
"github_enterprise_actions_workflow_permissions": resourceGithubEnterpriseActionsWorkflowPermissions(),
221218
"github_actions_organization_workflow_permissions": resourceGithubActionsOrganizationWorkflowPermissions(),
222219
"github_enterprise_security_analysis_settings": resourceGithubEnterpriseSecurityAnalysisSettings(),
223-
"github_enterprise_cost_center": resourceGithubEnterpriseCostCenter(),
224-
"github_enterprise_cost_center_users": resourceGithubEnterpriseCostCenterUsers(),
225-
"github_enterprise_cost_center_organizations": resourceGithubEnterpriseCostCenterOrganizations(),
226-
"github_enterprise_cost_center_repositories": resourceGithubEnterpriseCostCenterRepositories(),
227220
"github_workflow_repository_permissions": resourceGithubWorkflowRepositoryPermissions(),
228221
},
229222

@@ -301,15 +294,6 @@ func Provider() *schema.Provider {
301294
"github_user_external_identity": dataSourceGithubUserExternalIdentity(),
302295
"github_users": dataSourceGithubUsers(),
303296
"github_enterprise": dataSourceGithubEnterprise(),
304-
"github_enterprise_billing_premium_request_usage": dataSourceGithubEnterpriseBillingPremiumRequestUsage(),
305-
"github_enterprise_billing_usage": dataSourceGithubEnterpriseBillingUsage(),
306-
"github_enterprise_billing_usage_summary": dataSourceGithubEnterpriseBillingUsageSummary(),
307-
"github_enterprise_cost_center": dataSourceGithubEnterpriseCostCenter(),
308-
"github_enterprise_cost_centers": dataSourceGithubEnterpriseCostCenters(),
309-
"github_enterprise_team": dataSourceGithubEnterpriseTeam(),
310-
"github_enterprise_teams": dataSourceGithubEnterpriseTeams(),
311-
"github_enterprise_team_membership": dataSourceGithubEnterpriseTeamMembership(),
312-
"github_enterprise_team_organizations": dataSourceGithubEnterpriseTeamOrganizations(),
313297
"github_enterprise_scim_groups": dataSourceGithubEnterpriseSCIMGroups(),
314298
"github_enterprise_scim_group": dataSourceGithubEnterpriseSCIMGroup(),
315299
"github_enterprise_scim_users": dataSourceGithubEnterpriseSCIMUsers(),

website/github.erb

Lines changed: 0 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -100,21 +100,6 @@
100100
<li>
101101
<a href="/docs/providers/github/d/enterprise.html">github_enterprise</a>
102102
</li>
103-
<li>
104-
<a href="/docs/providers/github/d/enterprise_billing_premium_request_usage.html">github_enterprise_billing_premium_request_usage</a>
105-
</li>
106-
<li>
107-
<a href="/docs/providers/github/d/enterprise_billing_usage.html">github_enterprise_billing_usage</a>
108-
</li>
109-
<li>
110-
<a href="/docs/providers/github/d/enterprise_billing_usage_summary.html">github_enterprise_billing_usage_summary</a>
111-
</li>
112-
<li>
113-
<a href="/docs/providers/github/d/enterprise_cost_center.html">github_enterprise_cost_center</a>
114-
</li>
115-
<li>
116-
<a href="/docs/providers/github/d/enterprise_cost_centers.html">github_enterprise_cost_centers</a>
117-
</li>
118103
<li>
119104
<a href="/docs/providers/github/d/enterprise_scim_group.html">github_enterprise_scim_group</a>
120105
</li>
@@ -127,18 +112,6 @@
127112
<li>
128113
<a href="/docs/providers/github/d/enterprise_scim_users.html">github_enterprise_scim_users</a>
129114
</li>
130-
<li>
131-
<a href="/docs/providers/github/d/enterprise_team.html">github_enterprise_team</a>
132-
</li>
133-
<li>
134-
<a href="/docs/providers/github/d/enterprise_team_membership.html">github_enterprise_team_membership</a>
135-
</li>
136-
<li>
137-
<a href="/docs/providers/github/d/enterprise_team_organizations.html">github_enterprise_team_organizations</a>
138-
</li>
139-
<li>
140-
<a href="/docs/providers/github/d/enterprise_teams.html">github_enterprise_teams</a>
141-
</li>
142115
<li>
143116
<a href="/docs/providers/github/d/external_groups.html">github_external_groups</a>
144117
</li>
@@ -346,33 +319,12 @@
346319
<li>
347320
<a href="/docs/providers/github/r/enterprise_actions_permissions.html">github_enterprise_actions_permissions</a>
348321
</li>
349-
<li>
350-
<a href="/docs/providers/github/r/enterprise_cost_center.html">github_enterprise_cost_center</a>
351-
</li>
352-
<li>
353-
<a href="/docs/providers/github/r/enterprise_cost_center_organizations.html">github_enterprise_cost_center_organizations</a>
354-
</li>
355-
<li>
356-
<a href="/docs/providers/github/r/enterprise_cost_center_repositories.html">github_enterprise_cost_center_repositories</a>
357-
</li>
358-
<li>
359-
<a href="/docs/providers/github/r/enterprise_cost_center_users.html">github_enterprise_cost_center_users</a>
360-
</li>
361322
<li>
362323
<a href="/docs/providers/github/r/enterprise_organization.html">github_enterprise_organization</a>
363324
</li>
364325
<li>
365326
<a href="/docs/providers/github/r/enterprise_security_analysis_settings.html">github_enterprise_security_analysis_settings</a>
366327
</li>
367-
<li>
368-
<a href="/docs/providers/github/r/enterprise_team.html">github_enterprise_team</a>
369-
</li>
370-
<li>
371-
<a href="/docs/providers/github/r/enterprise_team_membership.html">github_enterprise_team_membership</a>
372-
</li>
373-
<li>
374-
<a href="/docs/providers/github/r/enterprise_team_organizations.html">github_enterprise_team_organizations</a>
375-
</li>
376328
<li>
377329
<a href="/docs/providers/github/r/issue.html">github_issue</a>
378330
</li>

0 commit comments

Comments
 (0)