-
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
aws_lambda_alias uses previous version number #626
Comments
Is there any update on this? I can confirm that this issue exists Terraform v0.9.11 |
Having the same issue with v.0.10.0. |
Ditto for v0.10.7---have to
The first
...but only the second
|
I believe this issue is also related to this error: If you try to set the
As best I can tell (and I'm no expert here for sure), it seems that the In the meantime, I found that this silliness (computing the version via an intermediate
|
I believe I'm seeing a similar crash to @ryandub except in my case it's with resource "aws_cloudfront_distribution" "docs" {
# [...]
default_cache_behavior {
# [...]
lambda_function_association {
event_type = "viewer-request"
lambda_arn = "${aws_lambda_function.docs.arn}:${aws_lambda_function.docs.version}"
}
}
} His fix also works in my case too thankfully 🙏 I can post the diff output if it's useful. |
I've seen variations on this problem as well, where the new version is not used by dependent resources, and I'd like to take a stab at fixing it today. I have a pretty good idea of what is causing it and I'll try to create testcase and fix so the workaround with not needed. |
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. |
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! |
This issue was originally opened by @coryodaniel as hashicorp/terraform#12948. It was migrated here as part of the provider split. The original body of the issue is below.
aws_lambda_alias uses the previous version when a function gets updated.
Currently I have a set of versions of a function published:
aws lambda list-versions-by-function --function-name my_function
As you can see there are two versions here
8
and9
. When I run terraform plan withaws_lambda_function
changing (you can see thesource_code_hash
change) I get the output:9
already exists. When this function is uploaded, it will be version10
...Terraform Version
Terraform v0.9.1
Affected Resource(s)
Please list the resources as a list, for example:
Terraform Configuration Files
The text was updated successfully, but these errors were encountered: