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

r/aws_lambda_function: Added Lambda function name validation #25259

Merged
merged 4 commits into from
Sep 1, 2022

Conversation

daftkid
Copy link
Contributor

@daftkid daftkid commented Jun 9, 2022

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

Closes #25090

Output from acceptance testing:

$ make testacc TESTS=TestAccXXX PKG=ec2

...

@github-actions github-actions bot added service/lambda Issues and PRs that pertain to the lambda service. needs-triage Waiting for first response or review from a maintainer. size/XS Managed by automation to categorize the size of a PR. labels Jun 9, 2022
@justinretzolk
Copy link
Member

Hey @daftkid 👋 Thank you very much for your contribution! Can you add a changelog entry as well?

@justinretzolk justinretzolk added waiting-response Maintainers are waiting on response from community or contributor. and removed needs-triage Waiting for first response or review from a maintainer. labels Jun 9, 2022
@daftkid
Copy link
Contributor Author

daftkid commented Jun 9, 2022

Hey @daftkid 👋 Thank you very much for your contribution! Can you add a changelog entry as well?

Hi @justinretzolk Done!

@github-actions github-actions bot removed the waiting-response Maintainers are waiting on response from community or contributor. label Jun 9, 2022
@justinretzolk justinretzolk added the enhancement Requests to existing resources that expand the functionality or scope. label Jun 9, 2022
@nimroda
Copy link

nimroda commented Jun 29, 2022

Hi @daftkid Is it expected to be merged to main soon?

@daftkid
Copy link
Contributor Author

daftkid commented Jun 29, 2022

Hi @daftkid Is it expected to be merged to main soon?

Hi @nimroda I did all the required code changes, however, I'm not a maintainer of the repo so I cannot merge it by myself.

@justinretzolk any plans on moving it into the main?

@johnsonaj johnsonaj self-assigned this Aug 26, 2022
@johnsonaj johnsonaj force-pushed the f-add_lambda_name_validation branch from 6e4491a to 3a33c76 Compare September 1, 2022 16:01
@github-actions github-actions bot added tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. size/S Managed by automation to categorize the size of a PR. and removed size/XS Managed by automation to categorize the size of a PR. labels Sep 1, 2022
@johnsonaj johnsonaj force-pushed the f-add_lambda_name_validation branch from 3a33c76 to 1c7ea35 Compare September 1, 2022 16:07
@johnsonaj
Copy link
Contributor

LGTM 🚀

$ make testacc TESTS=TestAccLambdaFunction_ PKG=lambda
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/lambda/... -v -count 1 -parallel 20 -run='TestAccLambdaFunction_'  -timeout 180m
=== RUN   TestAccLambdaFunction_basic
=== PAUSE TestAccLambdaFunction_basic
=== RUN   TestAccLambdaFunction_unpublishedCodeUpdate
=== PAUSE TestAccLambdaFunction_unpublishedCodeUpdate
=== RUN   TestAccLambdaFunction_disappears
=== PAUSE TestAccLambdaFunction_disappears
=== RUN   TestAccLambdaFunction_codeSigning
=== PAUSE TestAccLambdaFunction_codeSigning
=== RUN   TestAccLambdaFunction_concurrency
=== PAUSE TestAccLambdaFunction_concurrency
=== RUN   TestAccLambdaFunction_concurrencyCycle
=== PAUSE TestAccLambdaFunction_concurrencyCycle
=== RUN   TestAccLambdaFunction_expectFilenameAndS3Attributes
=== PAUSE TestAccLambdaFunction_expectFilenameAndS3Attributes
=== RUN   TestAccLambdaFunction_envVariables
=== PAUSE TestAccLambdaFunction_envVariables
=== RUN   TestAccLambdaFunction_EnvironmentVariables_noValue
=== PAUSE TestAccLambdaFunction_EnvironmentVariables_noValue
=== RUN   TestAccLambdaFunction_encryptedEnvVariables
=== PAUSE TestAccLambdaFunction_encryptedEnvVariables
=== RUN   TestAccLambdaFunction_nameValidation
=== PAUSE TestAccLambdaFunction_nameValidation
=== RUN   TestAccLambdaFunction_versioned
=== PAUSE TestAccLambdaFunction_versioned
=== RUN   TestAccLambdaFunction_versionedUpdate
=== PAUSE TestAccLambdaFunction_versionedUpdate
=== RUN   TestAccLambdaFunction_enablePublish
=== PAUSE TestAccLambdaFunction_enablePublish
=== RUN   TestAccLambdaFunction_disablePublish
=== PAUSE TestAccLambdaFunction_disablePublish
=== RUN   TestAccLambdaFunction_deadLetter
=== PAUSE TestAccLambdaFunction_deadLetter
=== RUN   TestAccLambdaFunction_deadLetterUpdated
=== PAUSE TestAccLambdaFunction_deadLetterUpdated
=== RUN   TestAccLambdaFunction_nilDeadLetter
=== PAUSE TestAccLambdaFunction_nilDeadLetter
=== RUN   TestAccLambdaFunction_fileSystem
=== PAUSE TestAccLambdaFunction_fileSystem
=== RUN   TestAccLambdaFunction_image
=== PAUSE TestAccLambdaFunction_image
=== RUN   TestAccLambdaFunction_architectures
=== PAUSE TestAccLambdaFunction_architectures
=== RUN   TestAccLambdaFunction_architecturesUpdate
=== PAUSE TestAccLambdaFunction_architecturesUpdate
=== RUN   TestAccLambdaFunction_architecturesWithLayer
=== PAUSE TestAccLambdaFunction_architecturesWithLayer
=== RUN   TestAccLambdaFunction_ephemeralStorage
=== PAUSE TestAccLambdaFunction_ephemeralStorage
=== RUN   TestAccLambdaFunction_tracing
=== PAUSE TestAccLambdaFunction_tracing
=== RUN   TestAccLambdaFunction_KMSKeyARN_noEnvironmentVariables
=== PAUSE TestAccLambdaFunction_KMSKeyARN_noEnvironmentVariables
=== RUN   TestAccLambdaFunction_layers
=== PAUSE TestAccLambdaFunction_layers
=== RUN   TestAccLambdaFunction_layersUpdate
=== PAUSE TestAccLambdaFunction_layersUpdate
=== RUN   TestAccLambdaFunction_vpc
=== PAUSE TestAccLambdaFunction_vpc
=== RUN   TestAccLambdaFunction_vpcRemoval
=== PAUSE TestAccLambdaFunction_vpcRemoval
=== RUN   TestAccLambdaFunction_vpcUpdate
=== PAUSE TestAccLambdaFunction_vpcUpdate
=== RUN   TestAccLambdaFunction_VPC_withInvocation
=== PAUSE TestAccLambdaFunction_VPC_withInvocation
=== RUN   TestAccLambdaFunction_VPCPublishNo_changes
=== PAUSE TestAccLambdaFunction_VPCPublishNo_changes
=== RUN   TestAccLambdaFunction_VPCPublishHas_changes
=== PAUSE TestAccLambdaFunction_VPCPublishHas_changes
=== RUN   TestAccLambdaFunction_VPC_properIAMDependencies
=== PAUSE TestAccLambdaFunction_VPC_properIAMDependencies
=== RUN   TestAccLambdaFunction_emptyVPC
=== PAUSE TestAccLambdaFunction_emptyVPC
=== RUN   TestAccLambdaFunction_s3
=== PAUSE TestAccLambdaFunction_s3
=== RUN   TestAccLambdaFunction_localUpdate
=== PAUSE TestAccLambdaFunction_localUpdate
=== RUN   TestAccLambdaFunction_LocalUpdate_nameOnly
=== PAUSE TestAccLambdaFunction_LocalUpdate_nameOnly
=== RUN   TestAccLambdaFunction_S3Update_basic
=== PAUSE TestAccLambdaFunction_S3Update_basic
=== RUN   TestAccLambdaFunction_S3Update_unversioned
=== PAUSE TestAccLambdaFunction_S3Update_unversioned
=== RUN   TestAccLambdaFunction_tags
=== PAUSE TestAccLambdaFunction_tags
=== RUN   TestAccLambdaFunction_runtimes
=== PAUSE TestAccLambdaFunction_runtimes
=== RUN   TestAccLambdaFunction_Zip_validation
=== PAUSE TestAccLambdaFunction_Zip_validation
=== CONT  TestAccLambdaFunction_basic
=== CONT  TestAccLambdaFunction_versioned
=== CONT  TestAccLambdaFunction_vpcUpdate
=== CONT  TestAccLambdaFunction_layers
=== CONT  TestAccLambdaFunction_expectFilenameAndS3Attributes
=== CONT  TestAccLambdaFunction_nilDeadLetter
=== CONT  TestAccLambdaFunction_architecturesWithLayer
=== CONT  TestAccLambdaFunction_Zip_validation
=== CONT  TestAccLambdaFunction_runtimes
=== CONT  TestAccLambdaFunction_tags
=== CONT  TestAccLambdaFunction_S3Update_unversioned
=== CONT  TestAccLambdaFunction_S3Update_basic
=== CONT  TestAccLambdaFunction_LocalUpdate_nameOnly
=== CONT  TestAccLambdaFunction_localUpdate
=== CONT  TestAccLambdaFunction_s3
=== CONT  TestAccLambdaFunction_emptyVPC
=== CONT  TestAccLambdaFunction_VPC_properIAMDependencies
=== CONT  TestAccLambdaFunction_VPCPublishHas_changes
=== CONT  TestAccLambdaFunction_VPCPublishNo_changes
=== CONT  TestAccLambdaFunction_VPC_withInvocation
--- PASS: TestAccLambdaFunction_Zip_validation (7.76s)
=== CONT  TestAccLambdaFunction_codeSigning
--- PASS: TestAccLambdaFunction_expectFilenameAndS3Attributes (20.10s)
=== CONT  TestAccLambdaFunction_concurrencyCycle
--- PASS: TestAccLambdaFunction_s3 (37.98s)
=== CONT  TestAccLambdaFunction_concurrency
--- PASS: TestAccLambdaFunction_nilDeadLetter (54.12s)
=== CONT  TestAccLambdaFunction_disappears
--- PASS: TestAccLambdaFunction_S3Update_unversioned (57.15s)
=== CONT  TestAccLambdaFunction_disablePublish
--- PASS: TestAccLambdaFunction_basic (57.57s)
=== CONT  TestAccLambdaFunction_deadLetterUpdated
--- PASS: TestAccLambdaFunction_versioned (62.49s)
=== CONT  TestAccLambdaFunction_deadLetter
--- PASS: TestAccLambdaFunction_emptyVPC (69.46s)
=== CONT  TestAccLambdaFunction_encryptedEnvVariables
--- PASS: TestAccLambdaFunction_S3Update_basic (72.32s)
=== CONT  TestAccLambdaFunction_nameValidation
--- PASS: TestAccLambdaFunction_nameValidation (0.59s)
=== CONT  TestAccLambdaFunction_enablePublish
--- PASS: TestAccLambdaFunction_tags (107.48s)
=== CONT  TestAccLambdaFunction_tracing
--- PASS: TestAccLambdaFunction_codeSigning (100.78s)
=== CONT  TestAccLambdaFunction_KMSKeyARN_noEnvironmentVariables
--- PASS: TestAccLambdaFunction_runtimes (316.02s)
=== CONT  TestAccLambdaFunction_unpublishedCodeUpdate
--- PASS: TestAccLambdaFunction_VPCPublishNo_changes (491.42s)
=== CONT  TestAccLambdaFunction_versionedUpdate
--- PASS: TestAccLambdaFunction_VPC_withInvocation (501.66s)
=== CONT  TestAccLambdaFunction_EnvironmentVariables_noValue
--- PASS: TestAccLambdaFunction_layers (1060.22s)
=== CONT  TestAccLambdaFunction_architectures
--- PASS: TestAccLambdaFunction_VPC_properIAMDependencies (1069.44s)
=== CONT  TestAccLambdaFunction_architecturesUpdate
--- PASS: TestAccLambdaFunction_localUpdate (1073.30s)
=== CONT  TestAccLambdaFunction_envVariables
--- PASS: TestAccLambdaFunction_LocalUpdate_nameOnly (1079.16s)
=== CONT  TestAccLambdaFunction_image
    function_test.go:979: AWS_LAMBDA_IMAGE_LATEST_ID, AWS_LAMBDA_IMAGE_V1_ID and AWS_LAMBDA_IMAGE_V2_ID env vars must be set for Lambda Container Image Support acceptance tests.
--- SKIP: TestAccLambdaFunction_image (0.00s)
=== CONT  TestAccLambdaFunction_vpc
--- PASS: TestAccLambdaFunction_concurrency (1046.06s)
=== CONT  TestAccLambdaFunction_vpcRemoval
=== CONT  TestAccLambdaFunction_ephemeralStorage
--- PASS: TestAccLambdaFunction_VPCPublishHas_changes (1084.66s)
--- PASS: TestAccLambdaFunction_disappears (1033.31s)
=== CONT  TestAccLambdaFunction_fileSystem
--- PASS: TestAccLambdaFunction_concurrencyCycle (1070.15s)
=== CONT  TestAccLambdaFunction_layersUpdate
--- PASS: TestAccLambdaFunction_disablePublish (1050.19s)
--- PASS: TestAccLambdaFunction_deadLetterUpdated (1061.39s)
--- PASS: TestAccLambdaFunction_deadLetter (1060.97s)
--- PASS: TestAccLambdaFunction_architecturesWithLayer (1124.90s)
--- PASS: TestAccLambdaFunction_enablePublish (1060.95s)
--- PASS: TestAccLambdaFunction_encryptedEnvVariables (1065.02s)
--- PASS: TestAccLambdaFunction_KMSKeyARN_noEnvironmentVariables (1030.10s)
--- PASS: TestAccLambdaFunction_tracing (1042.10s)
--- PASS: TestAccLambdaFunction_EnvironmentVariables_noValue (654.35s)
--- PASS: TestAccLambdaFunction_architectures (111.64s)
--- PASS: TestAccLambdaFunction_envVariables (151.11s)
--- PASS: TestAccLambdaFunction_ephemeralStorage (302.50s)
--- PASS: TestAccLambdaFunction_vpc (488.99s)
--- PASS: TestAccLambdaFunction_unpublishedCodeUpdate (1259.90s)
--- PASS: TestAccLambdaFunction_architecturesUpdate (516.10s)
--- PASS: TestAccLambdaFunction_layersUpdate (502.78s)
--- PASS: TestAccLambdaFunction_versionedUpdate (1108.47s)
--- PASS: TestAccLambdaFunction_vpcRemoval (518.68s)
--- PASS: TestAccLambdaFunction_fileSystem (1049.75s)
--- PASS: TestAccLambdaFunction_vpcUpdate (2217.42s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/lambda	2220.056s

@johnsonaj johnsonaj self-requested a review September 1, 2022 16:10
@johnsonaj
Copy link
Contributor

@daftkid thanks for the contribution! 🎉 👏🏾

@johnsonaj johnsonaj merged commit e476b44 into hashicorp:main Sep 1, 2022
@github-actions github-actions bot added this to the v4.29.0 milestone Sep 1, 2022
@daftkid daftkid deleted the f-add_lambda_name_validation branch September 1, 2022 17:53
@github-actions
Copy link

github-actions bot commented Sep 2, 2022

This functionality has been released in v4.29.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. Thank you!

@github-actions
Copy link

github-actions bot commented Oct 4, 2022

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 4, 2022
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/S Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Validate Lambda Function Name
4 participants