Azure / azure-cli

Azure Command-Line Interface
MIT License
3.93k stars 2.9k forks source link

Azure Database for PostgreSQL Flexible Server - Allow enabling PostgreSQL authentication for existing servers #29346

Open danvalero opened 2 weeks ago

danvalero commented 2 weeks ago

Related command

az postgres flexible-server update

Is your feature request related to a problem? Please describe. It is not possible to enable PostgreSQL Authentication using az postgres flexible-server update PostgreSQL Authentication can only be enabled using CLI on creation time.

If "az postgres flexible-server update --password-auth Enabled" is used, no option to set the username and password, and get error:

(EngineCredentialsNotProvided) The admin credentials are required for creating admin role while enabling Password Authentication and must be provided. Code: EngineCredentialsNotProvided Message: The admin credentials are required for creating admin role while enabling Password Authentication and must be provided.

I need to use the portal to make then change (not programmatically) or "az rest" which adds complexity

Describe the solution you'd like

I want to be able to enable PostgreSQL authentication suing CLi in a simple way using "az postgres flexible-server update" by adding parameter [--admin-user] and use in conjunction with [--admin-password]

Describe alternatives you've considered N/A

Additional context

yonzhan commented 2 weeks ago

Thank you for opening this issue, we will look into it.

danvalero commented 2 weeks ago

Hi @yonzhan FYI. I am a MSFT. Technical Advisor for the Microsoft CSS Azure Database for PostgreSQL support team. I am opening this request on behalf of a customer that had issued to do it himself.

nachoalonsoportillo commented 2 weeks ago

@danvalero Thanks for creating this issue. I've triaged it already and created a backlog item to support that scenario in a future version of Azure CLI. While we fix this, users will have to continue using the az rest alternative as you suggested.