How to create azure PostgreSQL — Flexible Server using Terraform — Part1

FoxuTech
2 min readMar 20, 2022

--

As we checked what is Azure PostgreSQL Flexible Server and, in this article, let’s see how to create the flexible via Terraform.

As we all know, terraform is an infrastructure as code tool that lets you define both cloud and on-prem resources in human-readable configuration files that you can version, reuse, and share. You can then use a consistent workflow to provision and manage all your infrastructure throughout its lifecycle. With this saying, most of the organization adopted for hybrid solution and keeping all in single tool, rather maintaining separate code base for each cloud and infra providers.

Let’s check two scenarios in this topic, like one create the flexible from scratch with basic azure resource and other one just creates only components related to flexible server with assuming other resources are already exists.

Use case 1: This section considers you are provisioning Azure PostgreSQL Flexible Server from scratch with all basic azure resources as following

Configure your environment

Azure subscription: This article considers you have azure subscription, if you don’t have please create one from Create Your Azure Free Account Today | Microsoft Azure

Terraform Setup: Follow official page to download and install terraform from https://www.terraform.io/downloads.

Implement the Terraform code

  1. Create a directory in which to test and run the sample Terraform code and make it the current directory.
  2. Create a file named providers.tf and insert the following code:

Continue to read on official page on How to create azure PostgreSQL — Flexible Server using Terraform — Part1 — FoxuTech

Foxutech — Home | Facebook

Foxutech (@foxutech) / Twitter

if you like please follow our medium page on https://foxutech.medium.com/

--

--

FoxuTech
FoxuTech

Written by FoxuTech

Discuss about #Linux, #DevOps, #Docker, #kubernetes, #HowTo’s, #cloud & IT technologies like #argocd #crossplane #azure https://foxutech.com/

No responses yet