Question

Sanjay U on Mon, 29 Apr 2019 10:07:44


Hi Everyone,

I am having a PostgreSQL DB which stores some data . Now i need to create a new PostgreSQL DB using the existing Postgre SQL db through Terraform. I could not not find any documentation on this . Could you please help me on this.

Like in AWS we have an terraform input argument saying "Snapshot_Identifier" which states "Specifies whether or not to create the database from a snapshot". Similarly do we have any argument in Azure like this ?. 

Thanks in Advance,

Sanjay

Replies

Mike Ubezzi (Azure) on Mon, 29 Apr 2019 18:00:38


Hi Sanjay,

There is an option to create an Azure Database for PostgreSQL instance via a backup file but that backup file must be for a PostgreSQL instance previously deployed as an Azure Database for PostgreSQL instance. You will need to use one of the replication options listed below to migrate a PostgreSQL instance to Azure.

Currently, the backup option only allows you to select from a list of previous backup files. Since I have none, there are none to select from but, in the case that I had a previous backup file it would be listed here:

A few options for migrating a PostgreSQL database:

Migrate your PostgreSQL database using dump and restore

Migrate your PostgreSQL database using export and import

Minimal-downtime migration to Azure Database for PostgreSQL

Sanjay U on Thu, 09 May 2019 14:41:29


Hi Mike,

Thank you for the response. I have already tried this manually through Azure Portal . But i want to do this same thing through terraform script.

Thanks,

Sanjay.