Policy Change Notice: Net-new resources/data sources will require use of AutoFlex instead of manually implemented flattening and expanding functions #38907
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
Description
In order to simplify implementation and maintenance, net-new resources should use AutoFlex, i.e. the functions
flex.Flatten
andflex.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
toTRACE
and include the log in your issue.The effective date of this change will be dictated by the following being completed:
skaff
for AutoFlex #39056Maintainer 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.
The text was updated successfully, but these errors were encountered: