-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Simplify Validation Functions in validators.go with Terraform helper/validation Functions #8424
Comments
Could these also be used to simplify resource acceptance tests or is the proposal to remove things like below? For example in a recent pr I spent a non-trivial amount of time hacking together a valid
|
@jukie I think once we start seeing patterns of validation being used, we can likely start creating constants for the error messages that can be shared between the code and testing |
…sterId into inline ValidateFunc Reference: #8424 Output from acceptance testing: ``` --- PASS: TestAccAWSDAXCluster_encryption_disabled (739.98s) --- PASS: TestAccAWSDAXCluster_basic (756.03s) --- PASS: TestAccAWSDAXCluster_importBasic (796.86s) --- PASS: TestAccAWSDAXCluster_encryption_enabled (865.80s) --- PASS: TestAccAWSDAXCluster_resize (1414.26s) ```
Marking this issue as stale due to inactivity. This helps our maintainers find and focus on the active issues. If this issue receives no comments in the next 30 days it will automatically be closed. Maintainers can also remove the stale label. If this issue was automatically closed and you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thank you! |
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. |
Community Note
Description
The Terraform AWS Provider has a long history of adding custom validation functions used with Terraform resource schema
ValidateFunc
. Many times, the patterns discovered throughout these custom validation functions in the provider have influenced the creation of upstream Terraform Provider SDK functions (currently living in the Terraform corehelper/validation
package). With organic growth, the addition of these custom functions have created large and sometimes difficult to maintainaws/validators.go
andaws/validators_test.go
files. Much of the validation logic can be replaced with upstream functions to simplify the implementations.Affected Resource(s)
Once design work is completed, this will be converted into a list. Each resource's validation should be individually updated to ease acceptance testing.
Code Examples
The text was updated successfully, but these errors were encountered: