integrations / integrations/terraform-provider-github
[BUG]: `github_organization_setting` fails with 422 when a fork policy is defined on enterprise level
- Dominant language
- Go
- Stars
- 1.2k
- Forks
- 1k
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 8
Description
The reconfiguration of a organization setting resource fails with the following changes when we have a policy defining a forking policy on enterprise level:
Policy:

Deployment output:
```plaintext
╷
│ Error: PATCH https://mydomain.ghe.com/api/v3/orgs/dnb-acme: 422 []
│
│ with module.organization-settings.github_organization_settings.this,
│ on .terraform/modules/organization-settings/main.settings.tf line 1, in resource "github_organization_settings" "this":
│ 1: resource "github_organization_settings" "this" {
│
╵
```
Upon disabling the forking setting on the organization, the deployment succeeds:

Logs from deployment are clean and green.
After first deployment i set the fork settings on organization same as the enterprise policy and rerun tf apply and no issues arrise on the second run.
Contributor guide
Assessment
This issue has not been assessed yet.