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

Feature/lambda ruby25 #6657

Merged
merged 3 commits into from
Nov 30, 2018
Merged

Feature/lambda ruby25 #6657

merged 3 commits into from
Nov 30, 2018

Conversation

ecwws
Copy link
Contributor

@ecwws ecwws commented Nov 30, 2018

Fixes #6656

Changes proposed in this pull request:

  • support ruby2.5 in runtime validation

Output from acceptance testing:

$ make testacc TESTARGS='-run=TestAccAWSAvailabilityZones'

...

@ghost ghost added size/S Managed by automation to categorize the size of a PR. service/lambda Issues and PRs that pertain to the lambda service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Nov 30, 2018
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.

Hi @ecwws 👋 Thanks for submitting this. Two things then this should be good to go.

CheckDestroy: testAccCheckLambdaFunctionDestroy,
Steps: []resource.TestStep{
{
Config: testAccAWSLambdaConfigPython37Runtime(funcName, policyName, roleName, sgName),
Copy link
Contributor

Choose a reason for hiding this comment

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

🍝 Copy-pasta

Suggested change
Config: testAccAWSLambdaConfigPython37Runtime(funcName, policyName, roleName, sgName),
Config: testAccAWSLambdaConfigRuby25Runtime(funcName, policyName, roleName, sgName),

Config: testAccAWSLambdaConfigPython37Runtime(funcName, policyName, roleName, sgName),
Check: resource.ComposeTestCheckFunc(
testAccCheckAwsLambdaFunctionExists("aws_lambda_function.lambda_function_test", funcName, &conf),
resource.TestCheckResourceAttr("aws_lambda_function.lambda_function_test", "runtime", lambda.Runtimeruby25),
Copy link
Contributor

Choose a reason for hiding this comment

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

😎 Typo that causes build failure

$ make test
==> Checking that code complies with gofmt requirements...
go test ./... -timeout=30s -parallel=4
?   	github.com/terraform-providers/terraform-provider-aws	[no test files]
# github.com/terraform-providers/terraform-provider-aws/aws [github.com/terraform-providers/terraform-provider-aws/aws.test]
aws/resource_aws_lambda_function_test.go:1251:92: undefined: lambda.Runtimeruby25
FAIL	github.com/terraform-providers/terraform-provider-aws/aws [build failed]
make: *** [test] Error 2
The command "make test" exited with 2.
Suggested change
resource.TestCheckResourceAttr("aws_lambda_function.lambda_function_test", "runtime", lambda.Runtimeruby25),
resource.TestCheckResourceAttr("aws_lambda_function.lambda_function_test", "runtime", lambda.RuntimeRuby25),

@bflad bflad added the enhancement Requests to existing resources that expand the functionality or scope. label Nov 30, 2018
@bflad bflad added this to the v1.51.0 milestone Nov 30, 2018
@ecwws
Copy link
Contributor Author

ecwws commented Nov 30, 2018

@bflad 👋 good catch, fixed the typo

@bflad bflad self-requested a review November 30, 2018 18:12
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.

LGTM, thanks @ecwws! 🚀

--- PASS: TestAccAWSLambdaFunction_nilDeadLetterConfig (27.46s)
--- PASS: TestAccAWSLambdaFunction_importS3 (28.57s)
--- PASS: TestAccAWSLambdaFunction_VPC (40.76s)
--- PASS: TestAccAWSLambdaFunction_basic (41.44s)
--- PASS: TestAccAWSLambdaFunction_importLocalFile_VPC (44.16s)
--- PASS: TestAccAWSLambdaFunction_versioned (46.63s)
--- PASS: TestAccAWSLambdaFunction_VPCUpdate (54.03s)
--- PASS: TestAccAWSLambdaFunction_runtimeValidation_noRuntime (0.51s)
--- PASS: TestAccAWSLambdaFunction_concurrency (56.76s)
--- PASS: TestAccAWSLambdaFunction_tracingConfig (57.27s)
--- PASS: TestAccAWSLambdaFunction_s3 (37.10s)
--- PASS: TestAccAWSLambdaFunction_importLocalFile (69.00s)
--- PASS: TestAccAWSLambdaFunction_VPCRemoval (71.39s)
--- PASS: TestAccAWSLambdaFunction_expectFilenameAndS3Attributes (71.70s)
--- PASS: TestAccAWSLambdaFunction_encryptedEnvVariables (73.96s)
--- PASS: TestAccAWSLambdaFunction_DeadLetterConfig (74.40s)
--- PASS: TestAccAWSLambdaFunction_concurrencyCycle (74.64s)
--- PASS: TestAccAWSLambdaFunction_localUpdate_nameOnly (36.41s)
--- PASS: TestAccAWSLambdaFunction_s3Update_basic (33.91s)
--- PASS: TestAccAWSLambdaFunction_s3Update_unversioned (31.39s)
--- PASS: TestAccAWSLambdaFunction_updateRuntime (83.67s)
--- PASS: TestAccAWSLambdaFunction_runtimeValidation_python27 (27.81s)
--- PASS: TestAccAWSLambdaFunction_versionedUpdate (84.80s)
--- PASS: TestAccAWSLambdaFunction_localUpdate (44.72s)
--- PASS: TestAccAWSLambdaFunction_envVariables (86.11s)
--- PASS: TestAccAWSLambdaFunction_runtimeValidation_java8 (28.78s)
--- PASS: TestAccAWSLambdaFunction_runtimeValidation_nodeJs43 (34.66s)
--- PASS: TestAccAWSLambdaFunction_runtimeValidation_python37 (25.20s)
--- PASS: TestAccAWSLambdaFunction_runtimeValidation_python36 (29.56s)
--- PASS: TestAccAWSLambdaFunction_tags (33.94s)
--- PASS: TestAccAWSLambdaFunction_runtimeValidation_ruby25 (28.73s)
--- PASS: TestAccAWSLambdaFunction_VPC_withInvocation (107.48s)
--- PASS: TestAccAWSLambdaFunction_DeadLetterConfigUpdated (140.19s)
--- PASS: TestAccAWSLambdaFunction_EmptyVpcConfig (118.72s)

@bflad bflad merged commit 31424e2 into hashicorp:master Nov 30, 2018
bflad added a commit that referenced this pull request Nov 30, 2018
@bflad
Copy link
Contributor

bflad commented Dec 5, 2018

This has been released in version 1.51.0 of the AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

@ghost
Copy link

ghost commented Apr 1, 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 1, 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/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.

Support Ruby 2.5 runtime in Lambda functions
2 participants