integrations / terraform-provider-github

Terraform GitHub provider
https://www.terraform.io/docs/providers/github/
MIT License
863 stars 708 forks source link

[BUG]: No warning/error on conflicting resource properties for `github_repository` #2264

Open garysassano opened 1 month ago

garysassano commented 1 month ago

Expected Behavior

The Terraform provider currently exhibits a problematic behavior where it silently ignores certain configuration settings when conflicting configurations are present.

Specifically, if a user defines squash_merge_commit_message or squash_merge_commit_title while disabling squash merges through allow_squash_merge = false, these settings are rendered meaningless. Similarly, specifying merge_commit_message or merge_commit_title without enabling allow_merge_commit has no effect.

Although this behavior is documented, relying solely on documentation is insufficient. Users may easily overlook these details, leading to unexpected outcomes and configuration confusion.

To enhance user experience and prevent silent misconfigurations, the provider should implement stronger validation mechanisms. Instead of silently ignoring conflicting settings, it should either:

This proactive approach would provide clearer feedback, reduce user frustration, and promote a more robust and reliable configuration process.

Actual Behavior

see above

Terraform Version

v1.8.3

Affected Resource(s)

Terraform Configuration Files

No response

Steps to Reproduce

No response

Debug Output

No response

Panic Output

No response

Code of Conduct