-
Notifications
You must be signed in to change notification settings - Fork 94
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
Refactor ToTerraformValue to return a tftypes.Value. #231
Conversation
4a6afc2
to
10e0034
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.
Much cleaner! Two things, otherwise, looks good to me 🚀
Refactor the `attr.Value.ToTerraformValue` to return a `tftypes.Value`, which simplifies a bunch of code and makes the interface safer by allowing it to be type checked by the compiler. It did require quite a bit of refactoring of internal code, however. This also simplifies checking whether an arbitrary `attr.Value` is null or unknown considerably. Fixes #171.
10e0034
to
182a41c
Compare
Co-authored-by: Brian Flad <bflad417@gmail.com>
Fixes look good? |
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.
Looks good to me 🚀
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions. |
Refactor the
attr.Value.ToTerraformValue
to return atftypes.Value
,which simplifies a bunch of code and makes the interface safer by
allowing it to be type checked by the compiler. It did require quite a
bit of refactoring of internal code, however.
This also simplifies checking whether an arbitrary
attr.Value
is nullor unknown considerably.
Fixes #171.