Open
Description
Problem
publicNetworkAccess
is not persisted when calling to create a Replica
PostgreSQL Single Server and publicNetorkAccess
is specified in ServerPropertiesForReplica
(docs)
How to reproduce it
- Use terraform to create a replica -> azurerm_postgresql_server public_network_access_enabled setting on replica not respected on create hashicorp/terraform-provider-azurerm#11346
From the logs:
PUT /subscriptions/***/resourceGroups/acctestRG-psql-210425092555925083-replica/providers/Microsoft.DBForPostgreSQL/servers/acctest-psql-server-210425092555925083-replica?api-version=2017-12-01 HTTP/1.1
{
"location": "westeurope",
"properties": {
"createMode": "Replica",
"infrastructureEncryption": "Disabled",
"minimalTlsVersion": "TLSEnforcementDisabled",
"publicNetworkAccess": "Disabled",
"sourceServerId": "/subscriptions/***/resourceGroups/acctestRG-psql-210425092555925083/providers/Microsoft.DBforPostgreSQL/servers/acctest-psql-server-210425092555925083",
"sslEnforcement": "Enabled",
"version": "11"
},
"sku": {
"name": "GP_Gen5_2",
"tier": "GeneralPurpose",
"capacity": 2,
"family": "Gen5"
},
"tags": {}
}
GET /subscriptions/***/resourceGroups/acctestRG-psql-210425092555925083-replica/providers/Microsoft.DBForPostgreSQL/servers/acctest-psql-server-210425092555925083-replica?api-version=2017-12-01 HTTP/1.1
{
"sku": {
"name": "GP_Gen5_2",
"tier": "GeneralPurpose",
"family": "Gen5",
"capacity": 2
},
"properties": {
"administratorLogin": "acctestun",
"storageProfile": {
"storageMB": 51200,
"backupRetentionDays": 7,
"geoRedundantBackup": "Disabled",
"storageAutogrow": "Enabled"
},
"version": "11",
"sslEnforcement": "Enabled",
"minimalTlsVersion": "TLSEnforcementDisabled",
"userVisibleState": "Ready",
"fullyQualifiedDomainName": "acctest-psql-server-210425092555925083-replica.postgres.database.azure.com",
"earliestRestoreDate": "2021-04-25T07:39:38.66+00:00",
"replicationRole": "Replica",
"masterServerId": "/subscriptions/***/resourceGroups/acctestRG-psql-210425092555925083/providers/Microsoft.DBforPostgreSQL/servers/acctest-psql-server-210425092555925083",
"replicaCapacity": 0,
"byokEnforcement": "Disabled",
"privateEndpointConnections": [],
"infrastructureEncryption": "Disabled",
"publicNetworkAccess": "Enabled"
},
"location": "westeurope",
"tags": {},
"id": "/subscriptions/***/resourceGroups/acctestRG-psql-210425092555925083-replica/providers/Microsoft.DBforPostgreSQL/servers/acctest-psql-server-210425092555925083-replica",
"name": "acctest-psql-server-210425092555925083-replica",
"type": "Microsoft.DBforPostgreSQL/servers"
}