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

Deploying via Shell Scripts does not set the POSTGRES_ADMIN_LOGIN_PASS #72

Closed
ShaneOsborne opened this issue Jul 5, 2022 · 3 comments
Closed

Comments

@ShaneOsborne
Copy link

Running setup.sh or install.sh does not prompt the user for the admin password for PGSQL as described in the deployment documentation.

Without this $POSTGRES_ADMIN_LOGIN_PASS is empty and deployment will fail saying

{"code":"DeploymentFailed","message":"At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/DeployOperations for usage details.","details":[{"code":"PasswordNotComplex","message":"Password validation failed. The password does not meet policy requirements because it is not complex enough."}]}

Thanks

@sjyang18
Copy link
Contributor

sjyang18 commented Jul 5, 2022

We are setting postgresAdminLoginPass if is not passed, and stores the password in keyvault as follows:

var postgresAdminLoginPassVar = empty(postgresAdminLoginPass) ? '${uniqueString(resourceGroup().id)}!' : postgresAdminLoginPass

Not sure what causes this problem. Do you have any suggestion? Do you think if we change like below, it will resolve the issue you see?

uniqueString(resourceGroup().id, deployment().name)

@sjyang18
Copy link
Contributor

@ShaneOsborne Would you share your bicep version for debugging? Mine is 0.6.1 and it was picking up the uniqueString function and a random password.

az bicep version
# to upgrade bicep
# az bicep upgrade

@sjyang18
Copy link
Contributor

sjyang18 commented Sep 9, 2022

@ShaneOsborne This seems to be taken care of changes in install.sh. install_sh would pass empty postgres admin password, which will generate the postgres password. Please get the latest main branch. I will close the issue for now. But, welcome to reopen.

@sjyang18 sjyang18 closed this as completed Sep 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants