Terraform-provider-aws: Provider attempts to update in line when Lambda alias name is changed

Created on 6 Apr 2018  ·  5Comments  ·  Source: hashicorp/terraform-provider-aws

Opening this issue as discussed is https://github.com/terraform-providers/terraform-provider-aws/issues/3192#issuecomment-371764787 where the provider attempts to perform a lambda alias' rename, which is not even an allowed operation.

Terraform Version

0.11.5

Affected Resource(s)

aws_lambda_alias

Terraform configuration files

Please see https://github.com/terraform-providers/terraform-provider-aws/issues/3192#issue-292762854

Expected Behavior

A new alias should be created - the name of an alias should be treated as an unique identifier.

Actual Behavior

An in line update is attempted, which fails with a 404 from the API:

* lambda.aws_lambda_alias.version: 1 error(s) occurred:

* aws_lambda_alias.version: Error updating Lambda alias: ResourceNotFoundException: Alias not found: arn:aws:lambda:us-east-1:999999999999:function:sample-lambda:MASTER-121
        status code: 404, request id: ca3401b9-237d-11e8-8e0e-05a5757ee33f

Steps to Reproduce

  1. Create and apply a lambda and tag it with aliases according to the scheme shown at the top.
  2. Change the lambda_version variable.
  3. terraform apply

References

https://github.com/terraform-providers/terraform-provider-aws/issues/3192
https://github.com/terraform-providers/terraform-provider-aws/issues/3192#issuecomment-371764787

bug serviclambda

Most helpful comment

The fix for this has been merged into master and will release with v1.14.1 of the AWS provider, likely on Wednesday. 🎉

All 5 comments

Thanks! Should be fixed in #4106 by making name a ForceNew change

Thank you for the really quick turnaround on this :)

The fix for this has been merged into master and will release with v1.14.1 of the AWS provider, likely on Wednesday. 🎉

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

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!

Was this page helpful?
0 / 5 - 0 ratings