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

Add validation to provider fields in both SDK and PF implementations of provider schema #15968

Commits on Sep 23, 2023

  1. Add validation to provider fields in both SDK and PF implementations …

    …of provider schema (hashicorp#9050)
    
    * Add empty-string validator for PF provider
    
    * Add empty-string validator for SDK provider, move SDK validators to separate file
    
    * Add empty string validators to : credentials, access_token, impersonate_service_account, project, billing_project, region, zone
    
    * Add unit tests for `ValidateEmptyStrings`
    
    * Remove empty string test case from `ValidateCredentials`
    
    * Add acceptace tests showing that empty strings in provider block results in a validation error, and empty provider blocks have no validation errors
    
    * Make the SDK provider's `ValidateCredentials` validator reject empty strings
    
    * Update acceptance test after change in `credentials` validation
    
    * Fix test definitions to avoid fall-through
    
    * Update validation error message in code and tests
    
    Signed-off-by: Modular Magician <magic-modules@google.com>
    modular-magician committed Sep 23, 2023
    Configuration menu
    Copy the full SHA
    a0f170e View commit details
    Browse the repository at this point in the history