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

Fix: Do not double quote TF >= 0.12 legacy quoted types #157

Merged
merged 3 commits into from
Jul 13, 2019
Merged

Fix: Do not double quote TF >= 0.12 legacy quoted types #157

merged 3 commits into from
Jul 13, 2019

Conversation

cytopia
Copy link
Contributor

@cytopia cytopia commented Jun 30, 2019

Do not double quote TF >= 0.12 legacy quoted types

This PR addresses another issue with double-double quoting legacy types. This happens if you still double quote string, list and map in Terraform >= 0.12.

Error: Invalid legacy variable type hint

  on variables.tf line 2, in variable "test":
   2:   type        = "map(string)"

The legacy variable type hint form, using a quoted string, allows only the
values "string", "list", and "map". To provide a full type expression, remove
the surrounding quotes and give the type expression directly.

You can find the reporting here: antonbabenko/pre-commit-terraform#52 (comment)

As well as the initial fix including regression tests here: cytopia/docker-terraform-docs#16

An example to reproduce the faulty behaviour (before this PR might be merged) can be found here:
https://github.com/cytopia/docker-terraform-docs/blob/master/tests/0.12/main.tf#L60

@osterman osterman requested a review from aknysh July 9, 2019 23:30
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.

thanks @cytopia

@aknysh aknysh merged commit 6375c34 into cloudposse:master Jul 13, 2019
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.

3 participants