hashicorp / terraform-provider-aws

The AWS Provider enables Terraform to manage AWS resources.
https://registry.terraform.io/providers/hashicorp/aws
Mozilla Public License 2.0
9.74k stars 9.1k forks source link

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

Open gdavison opened 4 weeks ago

gdavison commented 4 weeks ago

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.

github-actions[bot] commented 4 weeks ago

Community Note

Voting for Prioritization

Volunteering to Work on This Issue