Closed moko-poi closed 3 months ago
The python3.12
runtime is already supported.
https://github.com/terraform-linters/tflint-ruleset-aws/blob/v0.31.0/rules/models/aws_lambda_function_invalid_runtime.go#L64
You probably need to update the version of the ruleset you are using.
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:
Locate the file containing the rule definition for validating the runtime attribute of the aws_lambda_function resource. Update the list of valid runtime values to include python3.12. Test the updated rule to ensure it correctly validates the usage of python3.12 as a valid runtime. 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
AWS Lambda Runtimes: https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html Terraform AWS Provider Documentation - Lambda Function: https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lambda_function