Hi all,
I would create a postgresql database in azure and after it I would connect with the postgresql provider
Here is how I create the database
resource "azurerm_postgresql_server" "qumulateserver" {
name = "${var.database_server_name}"
location = "${azurerm_resource_group.qumulateterraform.location}"
resource_group_name = "${
azurerm_resource_group.qumulateterraform.name}"
sku {
name = "PGSQLB50"
capacity = 50
tier = "Basic"
}
administrator_login = "admin"
administrator_login_password = "password"
version = "9.5"
storage_mb = "51200"
ssl_enforcement = "Enabled"
}
Here how I would connect
provider "postgresql" {
alias = "pgconnect"
host = "${var.database_server_name}${var.postgres_fqdn}"
port = 5432
database = "${var.database_name}"
username = "${azurerm_postgresql_server.qumulateserver.administrator_login}@${var.database_server_name}${var.postgres_fqdn}"
password = "${azurerm_postgresql_server.qumulateserver.administrator_login_password}"
expected_version = "9.5.0"
}
So the probelm is with the versions. I get the following error
Error: Error refreshing state: 1 error(s) occurred:
* provider.postgresql.pgconnect: Error initializing PostgreSQL client: error detecting capabilities: error parsing version: Invalid character(s) found in patch number "9,"
I tried to change the db versions to the same minor and patchset versions but doesn't help. What can I do?