Fix plan/apply run from different control nodes #27
+126
−9
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When running the terraform plan/apply from different workstatons or build servers we found that the lambda filename attribute was still a fully qualified path that didn't always exist on each control node. The fixes to use relative paths hadn't been applied to the state file for resources that had previously existed. To resolve this we had to stop ignoring the
filename
attribute. To get to that point it was easier to reason about the paths by removing the indirection on the file references.Tested this across different workstations and we're getting the desired results now. Subsequent runs also aren't resulting in any further changes.
In order to reliably carry out testing we've also added a test framework for the lambda along with instructions. As part of this we needed to capture some incoming events, so the lambda now also has an option to log the raw incoming events.
The used python version has also been updated to 3.7 because it's available, considered stable, and works.
Please see individual commit messages for further details.