-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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
Support Lambda Layers #6651
Comments
Might also need a It looks like ListLayers and GetLayerVersion API's cloud support this. |
I'll take a look at this one 😄 |
Waiting for this to come to life... |
@acburdine Wondered if you'd had a chance to look into this yet? |
@popey456963 yup - just finished up the initial work on it this morning. Just need to add some docs and a data source for lambda_layer and I think it should be good. |
If I wanted to deploy a simple AWSLambda-Python37-SciPy1x layer to a python lambda, is there a way to do it within terraform until your enhancement gets pushed? I can look through the docs to see if there is some sort of generic mechanism I can use to call a layer create. Great work by the way! |
@acburdine Thank you for doing this, your PR (#6782) looks very straightforward, any idea if it will make it into 0.12.0? |
When can we expect this to be included in the stable Terraform release? |
Just to clear up any confusion, Terraform core and the Terraform AWS provider are on independently versioned and released. The provider aims for a weekly release cadence, but there will be a gap in that schedule with the end of December holiday season, resuming first week of January. As for when "this" will be released, depends on what you're looking for:
|
The review comments in #6782 are not fully addressed. |
@bflad sorry to bother you again with this issue. But is there an update about when we could use layers in terraform? It looks like @acburdine addressed the remarks on the PR. If possible I want to get a rough estimate so I know I can wait on it, or try to work around this using a Null provider. |
The |
refs hashicorp#6651 - add layers attribute to resource and data source - update documentation
Support for a While basic management use cases should now be covered, two pieces of functionality do still remain:
|
@bflad I was actually looking at implementing the data source (i've got some code locally), but I wasn't sure what the parameters would look like. I tried finding data sources with similar setups, but didn't find one quite like what would be needed for the lambda layer. My idea was this: To fetch a specific version: data "aws_lambda_layer_version" "example" {
layer_name = "my-layer"
version = "3"
} To get the most recent version: data "aws_lambda_layer_verson" "example" {
layer_name = "my-layer"
most_recent = true
} thoughts? |
also, should have a PR for the layer version permission up shortly |
@acburdine I think we can omit the |
sounds good - will work on that as well 👍 |
The new |
@bflad "aws_lambda_layer_version" doesn't seem to support data. I need to lookup a layer in my lambda deployment. How would I do that? |
@oxlade39 the data source hasn't been implemented yet. I've got some initial work on it locally that I've been meaning to get back to, will see if I can get it finished sometime this week or next. |
@acburdine sorry to bother again with the same question. Is the work for data support is done? If so can you point me to the documentation to it? |
How do I add "AWSLambda-Python36-SciPy1x" to my deploy? That is a layer that already exists in AWS... |
@kkpedrok Until the data support is added you will have to manually look up the arn for your region from the aws console and then use directly in your lambda terrraform. You probably want to have a property for the arn to make it simpler to change/upgrade |
Apologies for the delay, finally got the lambda_layer datasource submitted in #8577 😄 |
refs #6651 - add lambda_layer_version datasource & related documentation
Hi everyone! 👋 Great news, a new Since it appears we have covered functionality requested in the initial feature request here and these general "support X" type feature requests do not have a great definition of "done", I'm going to opt to close this issue now so we can focus on specific asks going forward. For any additional feature requests or bug reports with the Lambda Layer functionality in the Terraform AWS Provider, please create new GitHub issues so we can triage them. Thanks! |
@bflad the lambda_layer_permission resource hasn't been implemented yet, which was I believe in this issue as well. Can open a new issue though if needed |
Let's treat it separately now 👍 |
The |
Hi, I am trying to achieve the same? May you please let me know if you done the same and how? Thank you, |
@svlaskovic @kpedrok the following worked for me:
I didn't create a aws_lambda_layer_version resource, the above was enough. |
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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks! |
Community Note
Description
AWS has recently released a new feature, "Lambda Layers", a way of sharing code between Lambda functions. It would be useful for Terraform to support this.
New or Affected Resource(s)
Potential Terraform Configuration
The text was updated successfully, but these errors were encountered: