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

Environment variables are not removed from AWS lambda functions #10491

Closed
gurdulu opened this issue Dec 2, 2016 · 2 comments · Fixed by #10492
Closed

Environment variables are not removed from AWS lambda functions #10491

gurdulu opened this issue Dec 2, 2016 · 2 comments · Fixed by #10492

Comments

@gurdulu
Copy link

gurdulu commented Dec 2, 2016

Hi there,

deleting the section for setting environment variables the related variables on AWS Lambda are not removed.

Terraform version: 0.7.13

For replicating the issue create a first lambda function using environment variables

resource "aws_lambda_function" "test_1" {
    filename = "file.zip"
    function_name = "test_1"
    role = "${aws_iam_role.lambdas_role.arn}"
    handler = "test_1.handler"
    source_code_hash = "${base64sha256(file("file.zip"))}"
    environment {
       variables {
          test = 1
       }
}

generate the lambda function with terraform --apply, then change the script for removing the environment variables

resource "aws_lambda_function" "test_1" {
    filename = "file.zip"
    function_name = "test_1"
    role = "${aws_iam_role.lambdas_role.arn}"
    handler = "test_1.handler"
    source_code_hash = "${base64sha256(file("file.zip"))}"
}

run again terraform --apply, the variable is not deleted.

screen shot 2016-12-02 at 09 34 59

@Ninir
Copy link
Contributor

Ninir commented Dec 2, 2016

Hi @gurdulu ,
Sorry for the annoyance here. I just pushed a patch for this, which will be added to the next releases I guess.

@ghost
Copy link

ghost commented Apr 19, 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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Apr 19, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants