-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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
resource/aws_lambda_function: support Java 11, Nodejs12x, Python3.8 runtimes #10938
Conversation
Sorry for hijacking this PR, but I just wanted to say that I think this kind of validation seems kind of pointless.. or at least not very useful. We know that this list will change in the future, and do we really want to force people to wait a few days before they can use it? And folks who are stuck on old provider versions for various reasons will be unable to use the new runtime until they can get their stuff fixed. This is not the only place where terraform does this, I have had this other PR open since July and haven't heard a word. I think this strategy should be rethought and validation that prevents an apply should be used sparingly. Worst case AWS will return an error, but at least terraform won't be the blocker. How about instead of:
Terraform can say:
Just a thought.. Hope you consider it! |
I’d say the hard-coded check in terraform for this and many other cases could be made dynamic. If I set the runtime to nodejs13.x, terraform plan could already check against available runtimes (for my region) against my requested runtime. And in this case it could return an error “specified runtime not available” |
N.B. This code change also affects the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks @ethanrubio 🚀
Output from acceptance testing:
--- PASS: TestAccAWSLambdaFunction_expectFilenameAndS3Attributes (21.16s)
--- PASS: TestAccAWSLambdaFunction_nilDeadLetterConfig (23.01s)
--- PASS: TestAccAWSLambdaFunction_versioned (39.63s)
--- PASS: TestAccAWSLambdaFunction_Layers (43.08s)
--- PASS: TestAccAWSLambdaFunction_basic (48.23s)
--- PASS: TestAccAWSLambdaFunction_updateRuntime (54.48s)
--- PASS: TestAccAWSLambdaFunction_DeadLetterConfigUpdated (58.19s)
--- PASS: TestAccAWSLambdaFunction_EmptyVpcConfig (38.52s)
--- PASS: TestAccAWSLambdaFunction_runtimeValidation_noRuntime (1.41s)
--- PASS: TestAccAWSLambdaFunction_DeadLetterConfig (63.74s)
--- PASS: TestAccAWSLambdaFunction_versionedUpdate (66.19s)
--- PASS: TestAccAWSLambdaFunction_s3 (31.20s)
--- PASS: TestAccAWSLambdaFunction_KmsKeyArn_NoEnvironmentVariables (71.40s)
--- PASS: TestAccAWSLambdaFunction_concurrency (71.84s)
--- PASS: TestAccAWSLambdaFunction_concurrencyCycle (72.22s)
--- PASS: TestAccAWSLambdaFunction_localUpdate (35.43s)
--- PASS: TestAccAWSLambdaFunction_tracingConfig (78.68s)
--- PASS: TestAccAWSLambdaFunction_encryptedEnvVariables (79.60s)
--- PASS: TestAccAWSLambdaFunction_localUpdate_nameOnly (34.89s)
--- PASS: TestAccAWSLambdaFunction_envVariables (84.31s)
--- PASS: TestAccAWSLambdaFunction_runtimeValidation_NodeJs810 (28.94s)
--- PASS: TestAccAWSLambdaFunction_s3Update_basic (37.60s)
--- PASS: TestAccAWSLambdaFunction_s3Update_unversioned (36.12s)
--- PASS: TestAccAWSLambdaFunction_runtimeValidation_NodeJs10x (30.52s)
--- PASS: TestAccAWSLambdaFunction_runtimeValidation_NodeJs12x (29.82s)
--- PASS: TestAccAWSLambdaFunction_runtimeValidation_python27 (27.62s)
--- PASS: TestAccAWSLambdaFunction_runtimeValidation_java8 (28.04s)
--- PASS: TestAccAWSLambdaFunction_runtimeValidation_java11 (28.11s)
--- PASS: TestAccAWSLambdaFunction_LayersUpdate (101.41s)
--- PASS: TestAccAWSLambdaFunction_runtimeValidation_provided (27.35s)
--- PASS: TestAccAWSLambdaFunction_runtimeValidation_python36 (27.80s)
--- PASS: TestAccAWSLambdaFunction_runtimeValidation_python37 (27.67s)
--- PASS: TestAccAWSLambdaFunction_runtimeValidation_python38 (27.46s)
--- PASS: TestAccAWSLambdaFunction_runtimeValidation_ruby25 (27.38s)
--- PASS: TestAccAWSLambdaFunction_tags (42.04s)
--- PASS: TestAccAWSLambdaFunction_VpcConfig_ProperIamDependencies (1374.52s)
--- PASS: TestAccAWSLambdaFunction_VPC (1550.25s)
Hi @stefansundin / @dfens1 to follow up on your comments, you may be interested in these two Terraform Plugin SDK enhancement issues:
I do not believe we have intentions of removing these validations as errors since they prevent real world issues, especially for newer operators or those unfamiliar with an API and its expected values. That said if you feel strongly about these topics, we would suggest opening a proposal issue for further discussion. |
This has been released in version 2.39.0 of the Terraform AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template for triage. Thanks! |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks! |
Community Note
Closes #10919.
Reference: https://github.com/aws/aws-sdk-go/releases/tag/v1.25.38.
Release note for CHANGELOG:
Output from acceptance testing: