The oceans have parted and Lambda now natively supports passing environment variables into functions. The API changes are documented at http://docs.aws.amazon.com/lambda/latest/dg/API_CreateFunction.html. Opening an issue for anyone heroic enough to build this into the current AWS provider. Support for selecting KMS keys for encryption (included in the native AWS functionality) also would be much appreciated. This would be an awesome one to trot out before CloudFormation. :)
@davidski I already started working on this. We just need to wait for https://github.com/hashicorp/terraform/pull/10245 first, and then I will propose something :)
@davidski Well, the work is now even prepared in #10255! 😄
@Ninir - That's awesome! I feel like a heel for asking, but is there any chance support for specifying the KMS key (http://docs.aws.amazon.com/lambda/latest/dg/API_FunctionConfiguration.html) could also be included? As part of the new feature roll out, environment variables are encrypted with a KMS key which is either a default key or one specified in the function configuration. Allowing the user to specify the key used, as you can on the current CLI, would be super terrific.
@davidski Sure! Will do tomorrow :)
@davidski Just added the KMS Key ARN handling :)
@davidski This has been merged 10 hours ago, so you should be all set for 0.7.12 :)
Removed previous incorrect comment about KMS not being included. It is indeed! Back to turkey contemplation!
Big things to everyone that worked on this feature!
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.
Most helpful comment
@davidski I already started working on this. We just need to wait for https://github.com/hashicorp/terraform/pull/10245 first, and then I will propose something :)