Terraform code for deploying a PostgreSQL instance.
For the list of requirement, inputs, outputs, resources... check the terraform module documentation.
module "postgres" {
source = "git::https://github.com/DFE-Digital/terraform-modules.git//aks/postgres?ref=stable"
name = "database"
namespace = var.namespace
environment = "${var.app_environment}${var.app_suffix}"
azure_resource_prefix = var.azure_resource_prefix
service_name = "apply-for-qts"
service_short = "afqts"
config_short = "dv"
cluster_configuration_map = module.aks_cluster_data.configuration_map
use_azure = var.deploy_azure_backing_services
azure_extensions = ["UNACCENT"]
}
If azure_enable_monitoring
is true
, it’s expected that the following resources already exist:
- A resource group named
${azure_resource_prefix}-${service_short}-mn-rg
(wheremn
stands for monitoring andrg
stands for resource group). - A monitor action group named
${azure_resource_prefix}-${service_name}
within the above resource group.
The admin username of the PostgreSQL instance.
The admin password of the PostgreSQL instance.
The hostname of the PostgreSQL instance.
The port of the PostgreSQL instance.
The name of the database.
The URL used to connect to the PostgreSQL instance.
A connection string that's compatible with .NET applications to the PostgreSQL instance.
The name of the storage account that can be used to store backups.
The name of the storage container that can be used to store backups.
ID of the database server in terraform. It can be used to create more databases in the same server (only available when using Azure postgres).