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

[Bug]: Error: doesn't support update on aws_lambda_layer_version #33081

Closed
alnemo opened this issue Aug 18, 2023 · 6 comments · Fixed by #33097
Closed

[Bug]: Error: doesn't support update on aws_lambda_layer_version #33081

alnemo opened this issue Aug 18, 2023 · 6 comments · Fixed by #33097
Assignees
Labels
bug Addresses a defect in current functionality. prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. regression Pertains to a degraded workflow resulting from an upstream patch or internal enhancement. service/lambda Issues and PRs that pertain to the lambda service.
Milestone

Comments

@alnemo
Copy link

alnemo commented Aug 18, 2023

Terraform Core Version

1.2.8

AWS Provider Version

5.13

Affected Resource(s)

aws_lambda_layer_version

Expected Behavior

Layer is updated with new code

Actual Behavior

Layer fails to update when deployed with provider version 5.13, same layer is deployed when provider version is forced to 5.12

Relevant Error/Panic Output Snippet

module.api.aws_lambda_layer_version.lambda_layer_dependencies: Modifying... [id=arn:aws:lambda:us-east-1:XXXXXX:layer:lambda-dependencies:96]

Error: doesn't support update

  with module.api.aws_lambda_layer_version.lambda_layer_dependencies,
  on ../../lambda_api/lambda.tf line 5, in resource "aws_lambda_layer_version" "lambda_layer_dependencies":
   5: resource "aws_lambda_layer_version" "lambda_layer_dependencies" {

Terraform Configuration Files

resource "aws_lambda_layer_version" "lambda_layer_dependencies" {
  filename   = var.lambda_dependencies_filepath
  layer_name = "${local.project_name}-dependencies"

  compatible_runtimes = [
    "nodejs16.x"
  ]
  source_code_hash = filebase64sha256(var.lambda_dependencies_filepath)
}

Steps to Reproduce

Deploy a terraform, updating an existing lambda layer to new version

Debug Output

No response

Panic Output

module.api.aws_lambda_layer_version.lambda_layer_dependencies: Modifying... [id=arn:aws:lambda:us-east-1:XXXXXX:layer:lambda-dependencies:96]

Error: doesn't support update

  with module.api.aws_lambda_layer_version.lambda_layer_dependencies,
  on ../../lambda_api/lambda.tf line 5, in resource "aws_lambda_layer_version" "lambda_layer_dependencies":
   5: resource "aws_lambda_layer_version" "lambda_layer_dependencies" {

Important Factoids

Error started with provider version 5.13, same project is deployed when provider version is forced to 5.12

References

No response

Would you like to implement a fix?

None

@alnemo alnemo added the bug Addresses a defect in current functionality. label Aug 18, 2023
@github-actions
Copy link

Community Note

Voting for Prioritization

  • Please vote on this issue by adding a 👍 reaction to the original post to help the community and maintainers prioritize this request.
  • Please see our prioritization guide for information on how we prioritize.
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.

Volunteering to Work on This Issue

  • If you are interested in working on this issue, please leave a comment.
  • If this would be your first contribution, please review the contribution guide.

@github-actions github-actions bot added the service/lambda Issues and PRs that pertain to the lambda service. label Aug 18, 2023
@terraform-aws-provider terraform-aws-provider bot added the needs-triage Waiting for first response or review from a maintainer. label Aug 18, 2023
@alnemo alnemo changed the title [Bug]: [Bug]: Error: doesn't support update on lambda_layer_dependencies Aug 18, 2023
@alnemo alnemo changed the title [Bug]: Error: doesn't support update on lambda_layer_dependencies [Bug]: Error: doesn't support update on aws_lambda_layer_version Aug 18, 2023
@filol
Copy link
Contributor

filol commented Aug 18, 2023

Indroduce by #32535

@LimaGuilherme
Copy link

LimaGuilherme commented Aug 18, 2023

Same here

@justinretzolk justinretzolk added regression Pertains to a degraded workflow resulting from an upstream patch or internal enhancement. and removed needs-triage Waiting for first response or review from a maintainer. labels Aug 18, 2023
@terraform-aws-provider terraform-aws-provider bot added the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Aug 18, 2023
@nhood-nmdp
Copy link

We are also receiving this same error.

│ Error: doesn't support update

│ with aws_lambda_layer_version.this,
│ on lambda.tf line 1, in resource "aws_lambda_layer_version" "this":
│ 1: resource "aws_lambda_layer_version" "this" {

@github-actions
Copy link

This functionality has been released in v5.13.1 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@github-actions github-actions bot removed the bug Addresses a defect in current functionality. label Aug 18, 2023
@github-actions
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 18, 2023
@justinretzolk justinretzolk added the bug Addresses a defect in current functionality. label Feb 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. regression Pertains to a degraded workflow resulting from an upstream patch or internal enhancement. service/lambda Issues and PRs that pertain to the lambda service.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants