Closed aamkye closed 4 months ago
Thank you for your submission! We require that all contributors sign our Contributor License Agreement ("CLA") before we can accept the contribution. Read and sign the agreement
Learn more about why HashiCorp requires a CLA and what the CLA includes
Have you signed the CLA already but the status is still pending? Recheck it.
@catsby could you look at this? :)
Hey there @aamkye 👋🏻 , sorry you're running into trouble with the GitHub provider etag diffs.
Unforuntately, we won't be able to accept this contribution as this SDK is used by all Terraform providers. Computed attributes have no practical use with DiffSupressFunc
as the main intention of that function is to prevent inconsequential differences between "config" and prior state. Computed attributes aren't defined in config, which is why that original PR in the GitHub provider caused an internal validation error.
Looking briefly through the GitHub provider issues, it seems like the intended usage of the etag is for internal use by the provider, so the ideal solution would be to use private state to store that etag. That way, users can't reference etag
, any drift in the value would not be reported to users, and the provider would still be able to reference that value for caching purposes.
Unfortunately, it seems like the GitHub provider resources referenced here are written in the older terraform-plugin-sdk/v2
, which doesn't support private state. We don't have any plans to introduce private state to the older SDK, so the only way forward would be to migrate the GitHub provider resources over to terraform-plugin-framework
. I see there is an open issue to start that migration here: https://github.com/integrations/terraform-provider-github/issues/1912
Issues and PRs reference:
The ETags are shown in diff on almost every plan, even after apply just before the next plan. After this change, ETag diff disappears. I've also added tests.