Create and use PostgreSQL on Azure with Visual Studio Code

An Azure Database for PostgreSQL server resource provides you with a PostgreSQL server.

Create Azure Database with Visual Studio Code extension

Use this procedure for the following types of resources:

  • Azure Cosmos DB for MongoDB API
  • SQL
  • Azure Table
  • Gremlin
  • PostgreSQL

Create a PostgreSQL database

  1. Install the Azure Databases extension for Visual Studio Code.

  2. In Visual Studio Code, select Azure from the activity bar, then select Databases from the sidebar.

  3. Right-click the subscription name, then select Create server.

  4. Select PostgreSQL from the list.

    Select `PostgreSQL` from the list.

  5. Enter a name for your PostgreSQL server. This name is used as part of the connection string.

  6. Enter an Administrator user name.

  7. Enter an Administrator password, then enter it a second time in the next screen to confirm.

  8. Select your current IP address to add as the firewall rule.

  9. Select a resource group name or create a new one.

  10. Select an Azure region for your server.

  11. The notification window displays the status.

    The notification window displays the status.

Next steps