[Bug]: aws_lambda_function with empty environment variables map flaps #29255
Labels
bug
Addresses a defect in current functionality.
good first issue
Call to action for new contributors looking for a place to start. Smaller or straightforward issues.
service/lambda
Issues and PRs that pertain to the lambda service.
Milestone
Terraform Core Version
1.3.7
AWS Provider Version
4.53.0
Affected Resource(s)
aws_lambda_function
Expected Behavior
When setting the following block in
aws_lambda_function
, the resource should not repeatedly want to apply a change:Actual Behavior
Planning after an apply showed the
environment
block being added again.Relevant Error/Panic Output Snippet
Terraform Configuration Files
Steps to Reproduce
Debug Output
No response
Panic Output
No response
Important Factoids
Workarounds
If you're just specifying it statically, don't add the
environment
block. If it's a scenario where you are passing the environment variables as a (possibly empty)map
, this worked for me:References
Looks similar to #28495.
Would you like to implement a fix?
None
The text was updated successfully, but these errors were encountered: