Skip to content

Document validation #103

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

Closed
paddycarver opened this issue Aug 16, 2021 · 3 comments
Closed

Document validation #103

paddycarver opened this issue Aug 16, 2021 · 3 comments
Labels
documentation Improvements or additions to documentation

Comments

@paddycarver
Copy link
Contributor

With the merging of validation (#82, #75) we now have functionality that's not documented on terraform.io again. We should add a page for validation, and update our section on custom types, to document how to validate things.

@paddycarver paddycarver added the documentation Improvements or additions to documentation label Aug 16, 2021
@bflad
Copy link
Contributor

bflad commented Aug 30, 2021

Just ensuring this is captured: there have been multiple asks around unknown attribute value handling -- the current implementation always calls validation and allows implementors to choose on the desired logic on unknown values, but this could be confusing at first. e.g. this type of logic will likely be common:

value, ok := req.AttributeConfig.(types.String)

if !ok {
	return
}

if value.Unknown {
	return
}

So we should ensure that is well documented to consider this value state to prevent potential frustration. Higher level abstractions may be able to choose the more common path of ignoring unknown values.

@paddycarver
Copy link
Contributor Author

I think this is superseded by #144.

@github-actions
Copy link

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 10, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants