-
-
Notifications
You must be signed in to change notification settings - Fork 245
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
Reduce diff spam and unset defaults #65
Conversation
Couldn't this be done with a for-loop?
|
Maybe, I hadn't considered it. I'll give it a try though. I like the idea. The sub-maps are still somewhat problematic, but I didn't have any good ideas on how to address those. |
@dekimsey please rebase |
@jtdoepke Your recommendation is on point, much saner change. And at least for Fargate tasks, due the key validation we are doing in the module, there's still some diff noise (see below) It's possible when the new validation rules become mainstream, this could be tweaked again to improve output. I wanted to play with it some more, but I feared it might behave differently on Fargate vs ECS task deltas and I don't have any good tests for that. So right now, we still see some delta spam:
|
/test all |
/rebuild-readme |
/test all |
/test all |
/rebuild-readme |
/test all |
/rebuild-readme |
/test all |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Currently when the terraform plan is generated, there is a great deal of spurious noise from default values being re-set to null. This change alters how the JSON is being generated such that null entries are dropped entirely from the resultant task specification. It's not perfect, as there are some complex entries that have keys set as a result of the type system (logConfiguration for instance). But it does significantly reduce the noise in the delta.
Additionally, this drops all default values that don't correspond.
Before a plan might look like:
After:
Which is significantly reduced change noise. There are a few places it's still happening due to the sub-dictionary keys. I'm not sure if I want to go bother trying to address those.