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

feat(billing): add data source github_organization_billing_usage #73

@vmvarela

Description

@vmvarela

Description

Add a data source github_organization_billing_usage to expose the organization-level billing usage report via the enhanced billing platform.

Mirrors the existing github_enterprise_billing_usage data source but scoped to an organization.

go-github v84 API

func (s *BillingService) GetOrganizationUsageReport(ctx context.Context, org string, opts *UsageReportOptions) (*UsageReport, *Response, error)
// GET /orgs/{org}/settings/billing/usage

Acceptance Criteria

  • Data source github_organization_billing_usage implemented
  • Schema: owner (required), date filter fields (year, month, day), cost_center_id (optional)
  • Computed: usage_items list mirroring billing-usage branch structure
  • Registered in provider.go under DataSourcesMap
  • Docs at website/docs/d/organization_billing_usage.html.markdown
  • Acceptance test with skipUnauthenticated

Notes

  • Use util_enterprise_billing.go flatten helpers as reference
  • UsageReportOptions struct in go-github v84 billing.go

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority:highMust be in the next sprintsize:mMedium — 4 to 8 hourstype:featureNew functionality

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions