claranet / terraform-aws-lambda

Terraform module for AWS Lambda functions
MIT License
157 stars 127 forks source link

Add AWS Provider Version Constraint #45

Closed claranet-barney closed 5 years ago

claranet-barney commented 5 years ago

AWS Provider modifies the way Lambda Concurrency is handled so that:

-1 == unreserved concurrency 0 == zero concurrency (do not run)

1 == reserved concurrency limits

previous provider versions had used 0 to indicate unreserved concurrency

This change adds the AWS provider version constraing >= 2.0.0 to ensure the provider behaves as expected for the module

raymondbutcher commented 5 years ago

Unfortunately, we can't do this because it also overrides provider configuration. This is explained more in https://github.com/hashicorp/terraform/issues/16835 and will be fixed in Terraform 0.12.

raymondbutcher commented 5 years ago

For context, the problem that @claranet-barney is trying to fix is related to #39 which changed the default concurrency from 0 to -1. This technically works with all AWS provider versions (the deployed Lambda functions work fine) but with AWS provider versions before 2.0.0 Terraform will incorrectly read the -1 as 0 and want to change it back to -1 again.

claranet-barney commented 5 years ago

Thanks @raymondbutcher that makes sense, i'll close this one :+1: