-
Notifications
You must be signed in to change notification settings - Fork 4
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
Terraform Parser #19
Terraform Parser #19
Conversation
…dules, and project. Update setup.py to install hcl2 parser automatically. Update requirements.txt
…ts according to glitch-python-hcl2 updates
…ributes and variables)
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.
Besides the single comment I did, the code looks good to me. However, we should have integration tests for Terraform for each of the smells already implemented. Also, it would be nice to add unit tests for some edge cases that you found in the parsing (it is not done for the other technologies but should be considered in the future) -- I do not consider the unit tests urgent, but if it is simple please do it. Also, please update the README to add the Terraform technology, namely, this line:
glitch --tech (chef|puppet|ansible) --csv --config PATH_TO_CONFIG PATH_TO_FILE_OR_FOLDER
…nit Tests for some Terraform parsing cases; update README
3f7cd2a
to
d76b60e
Compare
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, very nice job :) The test set seems very complete. Please just change the indentation in the comments.tf
file! We should wait for @jff review and if the code looks good to him as well, we can merge.
e0d2e2b
to
368bb5a
Compare
jinja2 | ||
glitch-python-hcl2 |
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.
This is fine, but it might be a good idea to include versions (perhaps the best is to create a separate issue for that). Otherwise, we might have issues in a near future related to incompatible versions.
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.
I will open a issue for that
LGTM! Thanks a lot for this! 👏 |
Created the parser for Terraform files. In this pull request is also included the merge from IR Extension PR, to have the desired intermediate representation. The actual version of the parser is parsing Terraform resources, data sources, input variables, local values, output values, module blocks and comments.
The following example shows some terraform code and its corresponding parser
Parsed example: