terraform-linters / tflint

A Pluggable Terraform Linter
Mozilla Public License 2.0
4.88k stars 354 forks source link

Add python3.12 lambda runtime #2058

Closed moko-poi closed 3 months ago

moko-poi commented 3 months ago

Introduction

AWS Lambda has recently added support for the Python 3.12 runtime. This is a significant update that allows developers to leverage the latest features and improvements of the Python programming language when building Lambda functions. With the addition of Python 3.12 support, it is important to update the tflint tool to recognize and validate the usage of this new runtime.

Proposal

To accommodate the new Python 3.12 runtime in AWS Lambda, we propose updating the tflint tool to include python3.12 as a valid runtime value for the aws_lambda_function resource. This can be achieved by modifying the existing rule that checks for valid runtime values.

The implementation steps would be as follows:

  1. Locate the file containing the rule definition for validating the runtime attribute of the aws_lambda_function resource.
  2. Update the list of valid runtime values to include python3.12.
  3. Test the updated rule to ensure it correctly validates the usage of python3.12 as a valid runtime.
  4. Update the documentation and release notes to mention the addition of Python 3.12 runtime support in tflint.

By making this update, tflint will be able to properly validate Terraform configurations that use the Python 3.12 runtime for Lambda functions. This will help developers catch any misconfigurations or errors related to the runtime attribute early in the development process.

References

wata727 commented 3 months ago

Duplicate of https://github.com/terraform-linters/tflint-ruleset-aws/issues/644