Skip to content

feat(enterprise): add data sources github_enterprise_consumed_licenses and github_enterprise_license_sync_status #78

@vmvarela

Description

@vmvarela

Description

Add two data sources for enterprise license management:

  • github_enterprise_consumed_licenses — list of users consuming enterprise licenses, with details on each seat
  • github_enterprise_license_sync_status — license sync status between enterprise and connected server instances

go-github v84 API

func (s *EnterpriseService) GetConsumedLicenses(ctx context.Context, enterprise string, opts *ListOptions) (*EnterpriseConsumedLicenses, *Response, error)
// GET /enterprises/{enterprise}/consumed-licenses

func (s *EnterpriseService) GetLicenseSyncStatus(ctx context.Context, enterprise string) (*EnterpriseLicenseSyncStatus, *Response, error)
// GET /enterprises/{enterprise}/license-sync-status

Structs

type EnterpriseConsumedLicenses struct {
    TotalSeatsConsumed *int
    TotalSeatsPurchased *int
    Users []*EnterpriseUserLicense
}
type EnterpriseLicenseSyncStatus struct {
    // sync job state, last_sync_at, etc.
}

Acceptance Criteria

  • github_enterprise_consumed_licenses data source with enterprise_slug, pagination, computed seat counts and user list
  • github_enterprise_license_sync_status data source with enterprise_slug and computed status fields
  • Both registered in provider.go
  • Docs for each
  • Acceptance tests (can be skipped if enterprise license data not available in test env)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions