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

NodeJS 8.10 environment support for lambdas #4223

Closed
ghost opened this issue Apr 16, 2018 · 5 comments
Closed

NodeJS 8.10 environment support for lambdas #4223

ghost opened this issue Apr 16, 2018 · 5 comments
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/lambda Issues and PRs that pertain to the lambda service.
Milestone

Comments

@ghost
Copy link

ghost commented Apr 16, 2018

This issue was originally opened by @aleybovich as hashicorp/terraform#17872. It was migrated here as a result of the provider split. The original body of the issue is below.


Terraform Version

0.11.7

Terraform Configuration Files

resource "aws_lambda_function" "htn_config_audit" {
    ...
    runtime       = "nodejs8.10"
    ...
}

Expected Behavior

Terraform should run normally and a new lambda with node8.10 environment should be created

Actual Behavior

Error: module.htn.aws_lambda_function.htn_config_audit: expected runtime to be one of [nodejs4.3 nodejs6.10 java8 python2.7 python3.6 dotnetcore1.0 dotnetcore2.0 nodejs4.3-edge go1.x], got nodejs8.10

Steps to Reproduce

Create a lambda function element with runtime = "nodejs8.10"

Additional Context

AWS is now supporting nodejs 8.10 environment as of a couple of weeks ago. Please add support for the environment in terraform. I assume it's as simple as adding nodejs8.10 enumeration somewhere to have the element correctly validated

@bflad bflad added this to the v1.14.0 milestone Apr 17, 2018
@bflad bflad added enhancement Requests to existing resources that expand the functionality or scope. service/lambda Issues and PRs that pertain to the lambda service. labels Apr 17, 2018
@bflad
Copy link
Contributor

bflad commented Apr 17, 2018

This was previously merged in via #4020 and released in version 1.14.0 of the AWS provider and has been available in all releases since. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

@bflad bflad closed this as completed Apr 17, 2018
@HulaTime
Copy link

HulaTime commented May 11, 2018

@bflad This issue is still ongoing for me

resource "aws_lambda_function" "resource***********name" {
  filename         = "${path.module}/../zips/*****/src.zip"
  function_name    = "function****name"
  role             = "${aws_iam_role.lambda_role.arn}"
  handler          = "main.handler"
  source_code_hash = "${base64sha256(file("${path.module}/../zips/**********/src.zip"))}"
  memory_size      = "1536"
  runtime          = "nodejs8.10"
  timeout          = "60"
  publish          = true

  environment {
    variables = {
      live_db               = "${aws_s3_bucket.*******.id}"
      A*****t         = "${var.*****}"
    }
  }
}
$ terraform --version
Terraform v0.11.7

aws --version
aws-cli/1.14.34 Python/2.7.14 Darwin/16.7.0 botocore/1.8.38


$ terraform apply
Error: aws_lambda_function.********: expected runtime to be one of [nodejs4.3 nodejs6.10 java8 python2.7 python3.6 dotnetcore1.0 dotnetcore2.0 nodejs4.3-edge go1.x], got nodejs8.10

@bflad
Copy link
Contributor

bflad commented May 11, 2018

@maxprovin check your AWS provider version:

$ terraform -v
Terraform v0.11.7
+ provider.aws v1.18.0

or

$ terraform providers
.
└── provider.aws 1.18.0

Terraform core (0.11.7) is separately released from providers after 0.10+. The Terraform documentation on provider versioning goes into details about how to update your providers (I prefer version = "X.Y.Z" in provider configurations personally).

@aleybovich
Copy link

As @bflad said, you have outdated providers. To fix that just rerun terraform init in your project, that will update the providers. I had the same problem as you do, and that fixed it.

@ghost
Copy link
Author

ghost commented Apr 6, 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 6, 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.
Projects
None yet
Development

No branches or pull requests

3 participants