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

Optional strings should default to null not "" #768

Open
cassamajor opened this issue Apr 22, 2024 · 0 comments
Open

Optional strings should default to null not "" #768

cassamajor opened this issue Apr 22, 2024 · 0 comments
Labels

Comments

@cassamajor
Copy link

Describe the bug

When I ran terraform-docs tfvars hcl ., optional strings with no default value were represented as "".

I did a bit of reading on Type Constraints on Optional Object Type Attributes. Long story short is, a string type with no default value evaluates to tostring(null), not "".

How can we reproduce it?

  1. Clone this repository
  2. cd into the examples/terraform/aws directory.
  3. Run terraform-docs tfvars hcl .

Environment information

terraform-docs version v0.17.0 0.17.0 darwin/amd64
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant