-
Notifications
You must be signed in to change notification settings - Fork 227
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
error as I added new output variable to existing infra #93
Comments
@mitchellh Could be a major bug. @phinze I think there was some issue like this before. Please let me know if you need more details |
So, I do a terraform plan and apply |
Sorry for this strange failure @ranvijayj, and thanks for reporting it. Unfortunately the "diffs didn't match during apply" family of errors can be raised for a number of reasons, so it may or may not be related to other cases producing similar messages. In this case, based on the information in the error output it seems like the diffs for the
@jbardin, do you think this could be a symptom of hashicorp/terraform#17117? While the result was different in that bug, it did relate to items being removed from the diff. I'm not totally sure, since indeed it seems like in this case we successfully created the right diff during the plan stage but then some attributes were missed during the follow-up diff. |
@apparentlymart: I don't know if it's the cause, but I think it's related. Only showing |
Config of ec2 module that I am using: https://registry.terraform.io/modules/terraform-aws-modules/ec2-instance/aws/1.1.0
|
@jbardin I can share my entire code base with you once for this setup. Let me know.. Also, if I change nothing; I just do a terraform plan apply then terraform plan without any changes it still shows the same change to applied like I shared in the first comment. I even downgraded to terraform 0.11.0 still no help.. |
I think I solved it. In the module main.tf ebs_block_device { Hope you understand what is wrong in the above piece of code? ^^ Still worth considering so that output of error is proper. While creating there was no error... But still getting
even though nothing is changing in route table after plan and apply. Here is dev -> config.tf ::: https://drive.google.com/open?id=1__aoVg0ksNDz1r7hSfAv2gizr-erWBTu Public SubnetPrivate SubnetDefinitions |
Just in case you were attempting to modify the instances, see the final note under the block devices section in the provider docs:
If nothing really has changed, and you're on the latest provider release as well, I bet this is a module issue. It looks like that module is trying to map nested data structures to schema elements, which AFAIK just doesn't work (I see you've already files an issue over there as well). While we're making progress to better support complex data types in the configuration language, assigning schema structures from a variable isn't supported. |
Hi folks 👋 A lot has changed in Terraform CLI and SDK since this issue was raised. If there are still problems on more recent versions of both, please open a new issue and we can take a fresh look. 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. |
Terraform Version
Terraform Configuration Files
Debug Output
Crash Output
https://gist.github.com/ranvijayj/1ded35b16acbb71cbe934e8f429d16b4
AND
Also include as much context as you can about your config, state, and the steps you performed to trigger this error.
Expected Behavior
Actual Behavior
Steps to Reproduce
Found a really good way to reproduce
add any new variable to output.tf and ter plan and apply... It will fail with same error..
terraform init
terraform apply
Additional Context
References
For state management also using s3 and dynamodb as backends...
I removed the s3 backends and just changed the
instance count
in 1 module but all these changes showed up for no reasonThe text was updated successfully, but these errors were encountered: