I’m trying to understand the diff between the two attached state files.
The environment… any TF 1.3.x version; any AWS provider ~> 4.0. I haven’t exhaustively tested every possibility, but random combinations all show same error.
I’m developing a module to do a bunch of stuff with AWS IAM. And in the module I have some “unit tests” that I’m applying. These aren’t with the experimental testing framework, nor apparentlymart/testing. My unit tests are simple TF config.
When I start with a clean, “empty” state and then do an apply I get sorted.1.txt as my state file. I then ~immediately~ do another apply and I get sorted.2 as my state file. That second apply detects an output change. If you diff those, you’ll see the change at line 25 - "result": "dynamic"
. I’ve sanitized the state files a bit, so if there is something that’s syntactically wrong, that’s just poor editing on my part.
This is a small piece of a larger and more complex module, so I’m hoping to avoid sharing that as it would take an awful lot of explaining to get us to a common, usable starting point.
Instead, I’m hoping to get a sense of what might be the cause and where I might start looking and, possibly, create a test case that is consumable. Why does the first state (coming from an empty state) show “dynamic” and what does it mean? And why does it disappear after the 2nd and all future applies? This borders on a minor annoyance, but I’d like to get an understanding of what’s going on.
I have a niggling suspicion this has something to do with this being a recursive submodule. IOW… it’s a submodule that calls itself. I can back that out if needed. I’m use a pattern essentially like this.
Any ideas? Thanks!
sorted.1.txt (2.1 KB)
sorted.2.txt (2.9 KB)