Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(terraform): add ability to suppress github etag while being noisy when no actual state has been changed #1355

Closed
wants to merge 1 commit into from

Conversation

@aamkye aamkye requested a review from a team as a code owner July 2, 2024 09:12
Copy link

hashicorp-cla-app bot commented Jul 2, 2024

CLA assistant check
All committers have signed the CLA.

Copy link

CLA assistant check

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.

@aamkye
Copy link
Author

aamkye commented Jul 2, 2024

@catsby could you look at this? :)

@austinvalle
Copy link
Member

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: integrations/terraform-provider-github#1912

@austinvalle austinvalle closed this Jul 5, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants