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

Commit 3daa680

Browse files
committed
refactor(scim): move enterpriseSCIMMetaSchema() to util_enterprise_scim.go
Closes #54
1 parent c4a584b commit 3daa680

2 files changed

Lines changed: 26 additions & 25 deletions

File tree

github/data_source_github_enterprise_scim_groups.go

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -120,31 +120,6 @@ func dataSourceGithubEnterpriseSCIMGroupsRead(ctx context.Context, d *schema.Res
120120
return nil
121121
}
122122

123-
func enterpriseSCIMMetaSchema() map[string]*schema.Schema {
124-
return map[string]*schema.Schema{
125-
"resource_type": {
126-
Type: schema.TypeString,
127-
Computed: true,
128-
Description: "The SCIM resource type.",
129-
},
130-
"created": {
131-
Type: schema.TypeString,
132-
Computed: true,
133-
Description: "The creation timestamp.",
134-
},
135-
"last_modified": {
136-
Type: schema.TypeString,
137-
Computed: true,
138-
Description: "The lastModified timestamp.",
139-
},
140-
"location": {
141-
Type: schema.TypeString,
142-
Computed: true,
143-
Description: "The resource location.",
144-
},
145-
}
146-
}
147-
148123
func enterpriseSCIMGroupSchema() map[string]*schema.Schema {
149124
return map[string]*schema.Schema{
150125
"schemas": {

github/util_enterprise_scim.go

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import (
44
"context"
55

66
gh "github.com/google/go-github/v84/github"
7+
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
78
)
89

910
// enterpriseSCIMListAllGroups fetches all SCIM groups for an enterprise with automatic pagination.
@@ -222,3 +223,28 @@ func flattenEnterpriseSCIMUser(user *gh.SCIMEnterpriseUserAttributes) map[string
222223
}
223224
return m
224225
}
226+
227+
func enterpriseSCIMMetaSchema() map[string]*schema.Schema {
228+
return map[string]*schema.Schema{
229+
"resource_type": {
230+
Type: schema.TypeString,
231+
Computed: true,
232+
Description: "The SCIM resource type.",
233+
},
234+
"created": {
235+
Type: schema.TypeString,
236+
Computed: true,
237+
Description: "The creation timestamp.",
238+
},
239+
"last_modified": {
240+
Type: schema.TypeString,
241+
Computed: true,
242+
Description: "The lastModified timestamp.",
243+
},
244+
"location": {
245+
Type: schema.TypeString,
246+
Computed: true,
247+
Description: "The resource location.",
248+
},
249+
}
250+
}

0 commit comments

Comments
 (0)