Skip to content
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: Add length validation for lambda handler #12411

Merged
merged 2 commits into from
Mar 17, 2020

Conversation

moraneva
Copy link
Contributor

Community Note

  • Please vote on this pull request by adding a 👍 reaction to the original pull request comment to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for pull request followers and do not help prioritize the request

Relates OR Closes #12410

https://docs.aws.amazon.com/lambda/latest/dg/API_CreateFunction.html
"The name of the method within your code that Lambda calls to execute your function. The format includes the file name. It can also include namespaces and other qualifiers, depending on the runtime. For more information, see Programming Model.

Type: String"

Length Constraints: Maximum length of 128.
Release note for CHANGELOG:

resource/aws_lambda_function: Added length validation for handler field

Output from acceptance testing:

$ make testacc TESTARGS='-run=TestAccXXX'

...

@moraneva moraneva requested a review from a team March 16, 2020 14:51
@ghost ghost added size/XS Managed by automation to categorize the size of a PR. needs-triage Waiting for first response or review from a maintainer. service/lambda Issues and PRs that pertain to the lambda service. labels Mar 16, 2020
@moraneva
Copy link
Contributor Author

Let me know if you want me to update/add tests for this or run the acceptance tests. I figured it's a pretty small change so didn't know if it was necessary

@bflad bflad added enhancement Requests to existing resources that expand the functionality or scope. and removed needs-triage Waiting for first response or review from a maintainer. labels Mar 17, 2020
@bflad bflad self-assigned this Mar 17, 2020
@bflad bflad added this to the v2.54.0 milestone Mar 17, 2020
Copy link
Contributor

@bflad bflad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thanks for this, @moraneva 🚀

Output from acceptance testing:

--- PASS: TestAccAWSLambdaFunction_basic (36.98s)
--- PASS: TestAccAWSLambdaFunction_concurrency (50.46s)
--- PASS: TestAccAWSLambdaFunction_concurrencyCycle (47.08s)
--- PASS: TestAccAWSLambdaFunction_DeadLetterConfig (47.34s)
--- PASS: TestAccAWSLambdaFunction_DeadLetterConfigUpdated (48.84s)
--- PASS: TestAccAWSLambdaFunction_disappears (36.98s)
--- PASS: TestAccAWSLambdaFunction_EmptyVpcConfig (41.72s)
--- PASS: TestAccAWSLambdaFunction_encryptedEnvVariables (73.16s)
--- PASS: TestAccAWSLambdaFunction_envVariables (82.24s)
--- PASS: TestAccAWSLambdaFunction_expectFilenameAndS3Attributes (12.82s)
--- PASS: TestAccAWSLambdaFunction_KmsKeyArn_NoEnvironmentVariables (51.43s)
--- PASS: TestAccAWSLambdaFunction_Layers (36.17s)
--- PASS: TestAccAWSLambdaFunction_LayersUpdate (49.40s)
--- PASS: TestAccAWSLambdaFunction_localUpdate (40.31s)
--- PASS: TestAccAWSLambdaFunction_localUpdate_nameOnly (40.49s)
--- PASS: TestAccAWSLambdaFunction_nilDeadLetterConfig (18.37s)
--- PASS: TestAccAWSLambdaFunction_runtimeValidation_java11 (33.69s)
--- PASS: TestAccAWSLambdaFunction_runtimeValidation_java8 (33.14s)
--- PASS: TestAccAWSLambdaFunction_runtimeValidation_NodeJs10x (34.51s)
--- PASS: TestAccAWSLambdaFunction_runtimeValidation_NodeJs12x (33.12s)
--- PASS: TestAccAWSLambdaFunction_runtimeValidation_noRuntime (1.02s)
--- PASS: TestAccAWSLambdaFunction_runtimeValidation_provided (33.16s)
--- PASS: TestAccAWSLambdaFunction_runtimeValidation_python27 (32.82s)
--- PASS: TestAccAWSLambdaFunction_runtimeValidation_python36 (34.89s)
--- PASS: TestAccAWSLambdaFunction_runtimeValidation_python37 (33.76s)
--- PASS: TestAccAWSLambdaFunction_runtimeValidation_python38 (33.36s)
--- PASS: TestAccAWSLambdaFunction_runtimeValidation_ruby25 (33.58s)
--- PASS: TestAccAWSLambdaFunction_runtimeValidation_ruby27 (32.10s)
--- PASS: TestAccAWSLambdaFunction_s3 (24.26s)
--- PASS: TestAccAWSLambdaFunction_s3Update_basic (32.97s)
--- PASS: TestAccAWSLambdaFunction_s3Update_unversioned (40.62s)
--- PASS: TestAccAWSLambdaFunction_tags (45.92s)
--- PASS: TestAccAWSLambdaFunction_tracingConfig (48.55s)
--- PASS: TestAccAWSLambdaFunction_updateRuntime (55.02s)
--- PASS: TestAccAWSLambdaFunction_versioned (36.51s)
--- PASS: TestAccAWSLambdaFunction_versionedUpdate (54.41s)
--- PASS: TestAccAWSLambdaFunction_VPC (1581.57s)
--- PASS: TestAccAWSLambdaFunction_VPC_withInvocation (2254.31s)
--- PASS: TestAccAWSLambdaFunction_VpcConfig_ProperIamDependencies (2100.07s)
--- PASS: TestAccAWSLambdaFunction_VPCRemoval (1921.22s)

@bflad bflad merged commit cfdc643 into hashicorp:master Mar 17, 2020
bflad added a commit that referenced this pull request Mar 17, 2020
@ghost
Copy link

ghost commented Mar 19, 2020

This has been released in version 2.54.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!

@moraneva moraneva deleted the patch-1 branch March 24, 2020 16:39
@ghost
Copy link

ghost commented Apr 16, 2020

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!

@ghost ghost locked and limited conversation to collaborators Apr 16, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/lambda Issues and PRs that pertain to the lambda service. size/XS Managed by automation to categorize the size of a PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

resource/aws_lambda_function: Add validation to handler length
2 participants