Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
resource/random_password: Fix bcrypt_hash generation (#308)
Reference: #307 This change fixes the source of the `bcrypt_hash` generation to being the result of the random password generation. The issue was introduced in v3.4.0. Previously: ``` --- FAIL: TestAccResourcePassword_BcryptHash (0.63s) /Users/bflad/src/github.com/hashicorp/terraform-provider-random/internal/provider/resource_password_test.go:107: Step 1/1 error: Check failed: Check 3/3 error: crypto/bcrypt: hashedPassword is not the hash of the given password ``` Suggested CHANGELOG: ``` NOTES: * resource/random_password: If the resource was created between versions 3.4.0 and 3.4.2, the `bcrypt_hash` value would not correctly verify against the `result` value. Affected resources will automatically regenerate a valid `bcrypt_hash` after this upgrade. BUG FIXES: * resource/random_password: Fixed incorrect `bcrypt_hash` generation since version 3.4.0 ```
- Loading branch information