-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Handling of aws_lambda_alias on aws_lambda_function publish true #3192
Comments
Thanks @visit1985 for writing this up with the explanation, we run into the same problem. |
I believe that this problem is fixed with the pending PR #3032 |
Thanks to @mdlavin the fix for this has been merged into master and will be released in v1.10.0 of the AWS provider, likely later today or Monday. 🎉 |
This has been released in version 1.10.0 of the AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. |
@bflad #3032 fixes it partially. There is still the issue, that terraform tries to change the alias name as an in-place update.
Shall I open a new issue for that? |
@bflad ? |
@visit1985 did you end up opening a new issue for what you described? I can also see the same behaviour - surely this shouldn't be an update in-place? |
Please open a separate new issue, thanks 👍 |
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! |
Terraform Version
Terraform v0.11.2
AWS Provider Plugin v1.8.0
Affected Resource(s)
Terraform Configuration Files
1st iteration plan + apply
The resources are created already. We just change the
lambda_version
variable.Plan Output
Panic Output
2nd iteration plan + apply
Plan Output
Panic Output
3rd iteration plan + apply
Plan Output
Panic Output
None
Expected Behavior
aws_lambda_function
should mark theversion
attribute as changing whenpublish = true
is set, andaws_lambda_alias
should wait with the computation offunction_version
untilaws_lambda_function
resource returns the newversion
attribute (see 1nd iteration).aws_lambda_alias
cannot handle this as an in-place update, as the resource ARN changes (see 2nd iteration).We expect the plan output to look like this in first place:
aws_lambda_alias
should be able to (optionally) treat aliases like tags - never destroy, just create new ones.Assuming it plans it as a resource replacement, we could achieve that with
lifecycle { prevent_destroy = true }
.Actual Behavior
Shown in plan and debug output above.
We always need to apply thrice.
Steps to Reproduce
lambda_version
variable.terraform apply
The text was updated successfully, but these errors were encountered: