-
-
Notifications
You must be signed in to change notification settings - Fork 693
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
Provider produced inconsistent final plan: "registry.terraform.io/hashicorp/aws" produced an invalid new value for │ .timeouts: was present, but now absent. #486
Comments
Could you please provide a reproduction code with values I can run right away? Replace |
@antonbabenko I think the variables are mostly straightforward ones. module "the_user_info_function" {
function_name = "the_user_info_function"
function_description = "This function is about giving userinfo."
source = "./functions/the_user_info_function"
source_path = "./lambda/functions/the_user_info_function/lambda_function.py"
publish = true
timeout = 10
MASTER_API_TOKEN = var.MASTER_API_TOKEN
api_gateway_arn = var.api_gateway_arn
api_gateway_execution_arn = var.api_gateway_execution_arn
rest_api_id = var.rest_api_id
parent_id = var.parent_id
authorizer_id = var.authorizer_id
handler = "lambda_function.lambda_handler"
api_path_part = "user-info"
} |
Well, in this example you are using some kind of wrapper module, and it doesn't help much to figure out the root cause of the issue. Please try to reproduce it without the wrapper, first. |
Have the same issue.. also terraform 1.5.3 and this simplified code
The error started to appear from the upgrade of terraform-aws-modules/lambda/aws from v5.2.0 to v5.3.0. |
Seems like the cause of this is in 2a59ba2 timeout != timeouts. |
So the "was present, but now absent" state issues are explained here
The timeouts values when set to specific values or defaults are shown as planned state during planning (in terraform enterprise): So the value is planned, but doesn't make it into new state during apply. |
This issue has been automatically marked as stale because it has been open 30 days |
I am getting this too. What is the solution or workarounds? |
Related somehow to https://github.com/terraform-aws-modules/terraform-aws-lambda/blob/master/main.tf#L115-L119 reverted to 5.2.0 solved it for now |
This issue has been automatically marked as stale because it has been open 30 days |
this is still an issue. |
The PR that introduced "timeouts" in to the terraform-aws-lambda module is #485 The terraform-aws-lambda module configures the resource "aws_lambda_function" of the aws provider, which supports the timeouts parameter as documented here and implemented in code function.go. The error during terraform apply says |
did we fix the issue? |
@dbast you're probably right, this needs to be reported on https://github.com/hashicorp/terraform-provider-aws/issues |
I believe, there is a better solution - #522 (review) |
While this solves the initial problem caused by the timeouts values being set and improperly handled by terraform, it is possible you have already "infected" your state. The solution I found was to check the state file and update:
for
in all lambda |
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. |
Description
Working version of the infra code suddenly giving error from yesterday showing:
Versions
Module version [Required]: 5.3.0
Terraform version:1.5.3
Provider version(s): AWS:5.8.0
Reproduction Code [Required]
The text was updated successfully, but these errors were encountered: