Ordered output for Terraform resources with 'count'#77
Merged
adammck merged 1 commit intoadammck:masterfrom Oct 20, 2017
SamiHiltunen:ordered-list
Merged
Ordered output for Terraform resources with 'count'#77adammck merged 1 commit intoadammck:masterfrom SamiHiltunen:ordered-list
adammck merged 1 commit intoadammck:masterfrom
SamiHiltunen:ordered-list
Conversation
Owner
|
Thanks, this looks like a very sensible change. I'll try to get it reviewed in the next couple of days. Could you rebase against master, to ensure that it works with #72? |
* Outputs Terraform resources created with Count in the correct order.
Contributor
Author
|
Hey, I've rebased on master and the tests are passing. |
|
This would also be useful for me |
Contributor
Author
|
@adammck Polite ping! Would it be possible to have this merged? |
Owner
|
Thanks very much for this! Sorry about the delay on reviewing it. |
|
Awesome! @adammck When do you think another official release will be packaged? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Hey,
First of, thanks for the tool! It makes using Ansible with Terraform very convenient.
This PR sorts the output groups that correlate to Terraform resources created with
count.As an example, check this old generated inventory. The
kafkalist is not ordered a in the same manner as it is in Terraform.After this PR, the output of
kafkalist will be in proper order:As an aside, it will print to standard error when a key is overwritten during resource gathering. The tool has an issue, where resources of different types will overwrite others with the same name. Also, having tags with same value as the name of a resource will overwrite the old value. As it is not solvable in a backwards compatible manner, I decided to just print this out so the users will at least see the errors.