-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Docs list password as optional for google_sql_user but it is not #4123
Comments
This is interesting! It used to be required, then @viajab submitted a PR less than two years ago to make it optional (#1056), but I'm not sure why. I don't want to keep flip-flopping on this, so I want to check in with a couple maintainers to see if anyone else has context, but I can't see any indication that it's optional, so I imagine we'll probably make this required again. My best guess is that there was an upstream API change sometime in the last year or two? |
@paddycarver I think the issue here is that Postgres instances require a password and will fail without one but MySql instances don't. Since we support both types of databases through the same user resource we have to be at the lowest common level of validation so I don't think we can restrict this right now. There are some outstanding problems with the user API and what MYSQL accepts, such as blank hosts (#3784), so I suspect they might make the API more restrictive to disallow this at some point. |
OK. I'm willing to leave this optional and document it for 3.0.0, and if it turns out to be required, we'll hit it in 4.0.0 or decide if it's a breaking change to fix something that doesn't work at all. |
…hicorp#4123) Signed-off-by: Modular Magician <[email protected]>
…) (#7576) Signed-off-by: Modular Magician <[email protected]>
It is not required for Postgres when using |
Removing from |
b/261384656 The current documentation already covers this sufficiently: https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/sql_user#password |
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
Terraform Version
» terraform -v Terraform v0.11.14 + provider.google v2.10.0 + provider.google-beta v2.11.0 + provider.ns1 v1.4.0 + provider.random v2.1.2 + provider.template v2.1.0 Your version of Terraform is out of date! The latest version is 0.12.5. You can update by downloading from www.terraform.io/downloads.html
Affected Resource(s)
Terraform Configuration Files
Debug Output
Expected Behavior
Create the user with a randomly generated password.
Actual Behavior
Fails to create the user at all.
Steps to Reproduce
terraform apply
Important Factoids
If I supply the password things work just fine.
References
https://www.terraform.io/docs/providers/google/r/sql_user.html#password
The text was updated successfully, but these errors were encountered: