Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
default value hashing error for AWS block_device (schema error?) #824
In the case where you allow this attribute to be set to its default, you'll notice a line like this in the plan output.
However if you look at the state file after applying the plan it reads slightly differently.
Not only is the saved value of the attribute different but because that value is included in the set hashing method Terraform reads this as a different block device all together. The result is that Terraform will never acknowledge that it has already correctly created the resource.
As mentioned above, you can fix this by explicitly setting the attribute.
I'm not totally sure where the bug is here. The hashing function itself seems sound, and I can't account for the different result. It does seem that perhaps this is a larger issue with the schema code and not just an idiosyncrasy of this resource.
Notes: I would add a test in two places
I expect the first will pass right now and the second will fail, but we want both tests in there to make sure we don't regress.