terraform-provider-github icon indicating copy to clipboard operation
terraform-provider-github copied to clipboard

fix: imported custom property type

Open imaspen opened this issue 9 months ago • 1 comments

Imported custom properties currently default the type to null. This causes the state to then update with the real type value, which triggers a forced replacement. This fetches the type from the organization property schema and adds it on import.

Resolves #2639


Before the change?

  • An imported custom property resource's property_type is set to null, which causes the configuration to trigger a forced replacement of the resource.

After the change?

  • The property type is fetched from the organisation schema and set correctly, preventing the resource replacement.

Pull request checklist

  • [x] Tests for the changes have been added (for bug fixes / features)
  • [x] Docs have been reviewed and added / updated if needed (for bug fixes / features)

Does this introduce a breaking change?

Please see our docs on breaking changes to help!

  • [ ] Yes
  • [x] No

imaspen avatar Apr 25 '25 16:04 imaspen

Thanks for the fix @imaspen , we are impacted by this as well. Hopefully GH brings it into one of the upcoming releases.

m0un10 avatar Jun 17 '25 00:06 m0un10