Skip to content
This repository has been archived by the owner on Jun 8, 2022. It is now read-only.

Doesn't seem to work with version 12 #46

Closed
goochi1 opened this issue May 26, 2019 · 6 comments
Closed

Doesn't seem to work with version 12 #46

goochi1 opened this issue May 26, 2019 · 6 comments

Comments

@goochi1
Copy link

goochi1 commented May 26, 2019

Have the following code
environment {
variables {
BUCKET_NAME = "${aws_s3_bucket.s3_bucket.id}"
}
}

getting the following error

22: environment {

Blocks of type "environment" are not expected here. Did you mean to define
argument "environment"? If so, use the equals sign to assign it a value.

@goochi1
Copy link
Author

goochi1 commented May 26, 2019

Forked and tried to fix the issues see here https://github.com/goochi1/terraform-aws-lambda

However getting the following error

Error: Unsupported argument

on .terraform/modules/lambda_ri_reccomendation/lambda.tf line 67, in resource "aws_lambda_function" "lambda_with_dl":
67: environment = ["${slice( list(var.environment), 0, length(var.environment) == 0 ? 0 : 1 )}"]

An argument named "environment" is not expected here. Did you mean to define a
block of type "environment"?

@wutianchen
Copy link

@goochi1 I have the same issue, the thing is for resource "aws_lambda_function" now has a "environment block" instread of "environment argument". so it needs to be changed to

environment                    {
                                    variables = "${var.environment}"
                                  }

I am going to make a PR on this, but do not know if this repo is still actively maintained.

@lorengordon
Copy link
Contributor

@wutianchen It is quite active, I'm sure a PR would be appreciated.

@wutianchen
Copy link

@lorengordon thanks for the comment. will do that, might add feature like "hcl upgrade", "deploy from s3", "step functions". first needs to go through company open source policy process, might take a week or so

@raymondbutcher
Copy link
Contributor

Hi, this will be fixed in #49

@raymondbutcher
Copy link
Contributor

This is in version v1.0.0

mbklein pushed a commit to nulib/terraform-aws-lambda that referenced this issue Apr 25, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants