-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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
Changed resource does not trigger changes in depended module in same run #16727
Comments
Hi @stephanlindauer, Thanks for filing this with the full reproduction case.
|
Hi @jbardin, |
Actually, I'm not sure there is a good workaround at the moment. Depending on your exact use case, you may be able to put something together with a
This is a really good example for the data points I'm collecting to try and tackle various datasource issues in the near future. The datasource thinks it has the data available when its refreshed, but it can't know that it has changed until after the diff is run which is a later step. Thanks! |
The quirky behavior here would be addressed by the lifecycle change proposed in #17034. |
This seems like a pretty major bug in terraform. We just had a failed production release because of this. Can we get some traction in this? |
Hello! 🤖 This issue seems to be covering the same problem or request as #17034, so we're going to close it just to consolidate the discussion over there. 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 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. |
Terraform Version
Terraform Configuration Files
component/main.tf
module/main.tf
module/template.txt
Expected Behavior
Terraform should first change the
aws_s3_bucket_object
and then change the module that writes version of the newaws_s3_bucket_object
to that example file. In the dependency graph, the module should depend onaws_s3_bucket_object
and reevaluate once it has changed. I should only be required to runterraform apply
once to get those changes applied.Actual Behavior
I have to run Terraform twice.
First run:
Second run:
Steps to Reproduce
terraform init
terraform apply
content = "XXX"
ofaws_s3_bucket_object
terraform apply
terraform apply
The text was updated successfully, but these errors were encountered: