Skip to content
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] 0.12 support #7

Merged
merged 9 commits into from
Jun 5, 2019
Merged

[terraform] 0.12 support #7

merged 9 commits into from
Jun 5, 2019

Conversation

osterman
Copy link
Member

@osterman osterman commented Jun 4, 2019

what

  • Hacks to get terraform-docs to work with HCL2
  • Drop json2hcl which won't support HCl2

why

  • Terraform 0.12 use HCL2 which is not backwards compatible

references

@osterman osterman requested a review from aknysh June 4, 2019 22:55
grep -Eo '^\s*source\s*=\s*"(.*?)"' *.tf | cut -d'"' -f2 | sort -u > $TMPFILE
if [ -s $TMPFILE ]; then
# Verify the modules are pinned to `tags/x.y` or nothing at all (maybe using `version` parameter instead)
sed 's/^.*?ref=//' < $TMPFILE | grep -E '^(tags/[0-9]+\.[0-9]+.*|)$'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why in '^(tags/[0-9]+\.[0-9]+.*|)$', the first . escaped \., but the second one not?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The second one is not matching a ., but saying anything else (e.g 1.0 or 1.0-alpha or 1.0.2`, etc)

test/terraform/validate.bats Outdated Show resolved Hide resolved
Copy link
Member

@aknysh aknysh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see comments

@osterman osterman requested a review from aknysh June 5, 2019 01:45
@osterman osterman merged commit ffda33b into master Jun 5, 2019
@osterman osterman deleted the 0.12-support branch June 5, 2019 02:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants