Skip to content

feat: Add custom_properties to github_repository and github_enterpris…#3322

Open
faradayfan wants to merge 1 commit intointegrations:mainfrom
faradayfan:custom-properties
Open

feat: Add custom_properties to github_repository and github_enterpris…#3322
faradayfan wants to merge 1 commit intointegrations:mainfrom
faradayfan:custom-properties

Conversation

@faradayfan
Copy link
Copy Markdown

@faradayfan faradayfan commented Apr 6, 2026

feat: Add custom_properties to github_repository and github_enterprise_custom_property resource

Allow custom properties to be set on repositories at creation time, fixing 422 errors when an organization enforces required custom properties. Also adds a new github_enterprise_custom_property resource and data source for managing custom property definitions at the enterprise level.

Resolves #3230, #3304


Before the change?

  • Organizations enforcing required custom properties would cause github_repository to return a 422 error on creation, since custom properties could only be set via a separate github_repository_custom_property resource applied after creation
  • There was no Terraform resource or data source for defining custom property schemas at the enterprise level

After the change?

  • github_repository now accepts a custom_properties argument (a string map) that is included in the initial repository creation request, satisfying organization-required custom properties at creation time
  • A new github_enterprise_custom_property resource allows managing custom property definitions at the enterprise level, mirroring the existing github_organization_custom_properties resource
  • A new github_enterprise_custom_property data source allows reading enterprise custom property definitions
  • Documentation added for the new resource and data source, and updated for github_repository with a new argument description and example
  • Acceptance tests added using testResourcePrefix naming and ConfigStateChecks pattern

Pull request checklist

  • Schema migrations have been created if needed (example)
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been reviewed and added / updated if needed (for bug fixes / features)

Does this introduce a breaking change?

  • Yes
  • No

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 6, 2026

👋 Hi! Thank you for this contribution! Just to let you know, our GitHub SDK team does a round of issue and PR reviews twice a week, every Monday and Friday! We have a process in place for prioritizing and responding to your input. Because you are a part of this community please feel free to comment, add to, or pick up any issues/PRs that are labeled with Status: Up for grabs. You & others like you are the reason all of this works! So thank you & happy coding! 🚀

…e_custom_property resource (integrations#3230, integrations#3304)

Allow custom properties to be set on repositories at creation time,
fixing 422 errors when an organization enforces required custom
properties. Adds a new github_enterprise_custom_property resource and
data source for managing custom property definitions at the enterprise
level. Uses context-aware CRUD functions, proper 404 handling, and
ConfigStateChecks in acceptance tests per maintainer guidelines.

Closes integrations#3230, integrations#3304
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.

[FEAT]: Add support for defining custom properties for an enterprise

1 participant