PostgreSQL
Introduction
PostgreSQL support is offered for both Azure and GoogleCloudPlatform. Below you can find all arguments for both the DBMS and database in both cloud providers, as well as examples of how to use them to create your first LiveSystem with a PostgreSQL component.
Arguments
AzurePostgreSQL DBMS and Database
id
Required
displayName
description
version
locked
links
rootUser
Required
region
Required
skuName
Required
storageAutoGrow
Required
storageMB
Required
backupRetentionDays
Required
databases
Required
GCP PostgreSQL DBMS and Database
id
Required
displayName
description
version
locked
links
region
Required
network
Required
peeringNetworkAddress
Required
peeringNetworkAddressDescription
Required
peeringNetworkName
Required
peeringNetworkPrefix
Required
databases
Required
Postgresql Database
name
Required
charset
Required
collation
Required
schema
Required
Examples
Azure LiveSystem with PostgreSQL DBMS and Database
LiveSystem.builder()
.withName("postgresql")
.withDescription("PostgreSQL server and database")
.withResourceGroupId("test-resource-group")
.withComponent(AzurePostgreSQL.builder()
.withId(ComponentId.from("azure-psg"))
.withRegion(EUROPE_WEST)
.withRootUser("rootUser")
.withSkuName(B_GEN5_1)
.withStorageAutoGrow(ENABLED)
.withStorageMB(5 * 1024)
.withBackupRetentionDays(12)
.withDatabase(PostgreSQLDB.builder()
.withId(ComponentId.from("db-1"))
.withName("db")
.withCharset(UTF8)
.withCollation("English_United States.1252")
.withSchema("app")
.build())
.build())
.withEnvironment(Environment.builder()
.withId("efd7bcb5-7110-4369-859e-a7aab0c7f38c")
.withDisplayName("My Environment")
.withParentId("67f29f6b-fc23-4d30-9128-da5222444443")
.withParentType("tenant")
.build())
.build();
GCP LiveSystem with PostgreSQL DBMS and Database
LiveSystem.builder()
.withName("postgresql")
.withDescription("PostgreSQL server and database")
.withResourceGroupId("test-resource-group")
.withComponent(GcpProgreSQL.builder()
.withId("dbpg")
.withDescription("PostgreSQL")
.withDisplayName("PostgreSQL")
.withRegion(EU_WEST1)
.withNetwork("network")
.withPeeringNetworkAddress("10.0.8.0")
.withPeeringNetworkAddressDescription("postgres-host")
.withPeeringNetworkName("postgres-host")
.withPeeringNetworkPrefix("22")
.withDatabase(PostgreSQLDB.builder()
.withId(ComponentId.from("db-1"))
.withName("db")
.withCharset(UTF8)
.withCollation("English_United States.1252")
.withSchema("app")
.build())
.build())
.withEnvironment(Environment.builder()
.withId("efd7bcb5-7110-4369-859e-a7aab0c7f38c")
.withDisplayName("My Environment")
.withParentId("67f29f6b-fc23-4d30-9128-da5222444443")
.withParentType("tenant")
.build())
.build();