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

Policy Change Notice: Net-new resources/data sources will require use of AutoFlex instead of manually implemented flattening and expanding functions #38907

Open
3 tasks done
gdavison opened this issue Aug 17, 2024 · 1 comment
Labels
engineering-initiative Maintainer driven proposals to improve operation, or development experience of the provider. prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. skaff Issues and pull requested related to the skaff tool

Comments

@gdavison
Copy link
Contributor

gdavison commented Aug 17, 2024

Description

In order to simplify implementation and maintenance, net-new resources should use AutoFlex, i.e. the functions flex.Flatten and flex.Expand instead of individually flattening and expanding fields between provider models and AWS API structures.

Documentation can be found at https://hashicorp.github.io/terraform-provider-aws/data-handling-and-conversion/#autoflex-for-terraform-plugin-framework-preferred.

Note: This does not apply to enhancements and bug fixes to existing resources and data sources. Nor does it apply when converting resources or data sources from Terraform Plugin SDK v2 to Terraform Plugin Framework.

AutoFlex is expected to handle any conversions to and from Terraform attributes to AWS API structs. If you encounter a situation where conversion does not work, please file a GitHub issue. Enable AutoFlex logging by setting the environment variable TF_LOG_AWS_AUTOFLEX to TRACE and include the log in your issue.

The effective date of this change will be dictated by the following being completed:


Maintainer update

As of 5 September 2024, this policy is in effect. Existing pull requests do not need to be re-written to use AutoFlex. Where applicable maintainers will assist in changing these libraries. Enhancements and bug fixes do not require updating existing resources to use AutoFlex. This change only applies to net-new resources and data sources.

Copy link

Community Note

Voting for Prioritization

  • Please vote on this issue by adding a 👍 reaction to the original post to help the community and maintainers prioritize this request.
  • Please see our prioritization guide for information on how we prioritize.
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.

Volunteering to Work on This Issue

  • If you are interested in working on this issue, please leave a comment.
  • If this would be your first contribution, please review the contribution guide.

@github-actions github-actions bot added the skaff Issues and pull requested related to the skaff tool label Aug 17, 2024
@gdavison gdavison added engineering-initiative Maintainer driven proposals to improve operation, or development experience of the provider. prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. labels Aug 17, 2024
@gdavison gdavison pinned this issue Aug 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
engineering-initiative Maintainer driven proposals to improve operation, or development experience of the provider. prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. skaff Issues and pull requested related to the skaff tool
Projects
None yet
Development

No branches or pull requests

1 participant