Skip to content

Conversation

@vmvarela
Copy link
Owner

This pull request introduces support for managing GitHub Enterprise Cost Centers using Terraform. It adds new resource and data source implementations, along with comprehensive acceptance tests and an example configuration. The changes enable users to create, read, update, delete, and import cost centers, as well as assign users, organizations, and repositories to them in an authoritative manner.

New resource and data source support for cost centers:

  • Added the github_enterprise_cost_center resource, allowing creation, update, deletion, and import of cost centers, with support for reading their state and associated Azure subscription and resources. (github/resource_github_enterprise_cost_center.go)
  • Added the github_enterprise_cost_center_resources resource to manage authoritative assignments of users, organizations, and repositories to a cost center. (examples/cost_centers/main.tf)
  • Implemented the github_enterprise_cost_center and github_enterprise_cost_centers data sources for reading individual and lists of cost centers, including their resources and filtering by state. (github/data_source_github_enterprise_cost_center.go, github/data_source_github_enterprise_cost_centers.go) [1] [2]
  • Registered the new resources and data sources in the Terraform provider. (github/provider.go) [1] [2]

Testing and documentation:

  • Added acceptance tests for both the single and multiple cost center data sources to ensure correct behavior and integration. (github/data_source_github_enterprise_cost_center_test.go, github/data_source_github_enterprise_cost_centers_test.go) [1] [2]
  • Provided an example Terraform configuration demonstrating how to use the new resources and data sources for managing cost centers and their assignments. (examples/cost_centers/main.tf)

@vmvarela vmvarela merged commit ac7503c into alpha Dec 17, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants