Hello, I tried to create Azure DB for PostgresSQL...
# azure
p
Hello, I tried to create Azure DB for PostgresSQL with Data Encryption but ran into this error. azure-nativedbforpostgresqlServer (server5): error: Code="InternalServerError" Message="An unexpected error occured while processing the request. Tracking ID: '448e0c16-b379-4742-861a-36ae91a3c6df'" Code used
server5 = azure_native.dbforpostgresql.Server("server5",
administrator_login='tuvaadmin',
administrator_login_password='tuv1pg1!',
backup=azure_native.dbforpostgresql.BackupArgs(
backup_retention_days=7,
geo_redundant_backup=azure_native.dbforpostgresql.GeoRedundantBackupEnum.DISABLED,
),
location=resource_group_location,
resource_group_name=resource_group.name,
server_name=f"uh-{client_name}-server5",
sku=azure_native.dbforpostgresql.SkuArgs(
name="Standard_B1ms",
tier=azure_native.dbforpostgresql.SkuTier.BURSTABLE,
),
storage=azure_native.dbforpostgresql.StorageArgs(
storage_size_gb=32,
),
network=azure_native.dbforpostgresql.NetworkArgs(
delegated_subnet_resource_id=f"/subscriptions/{subscription_id}/resourceGroups/{resource_group_name}/providers/Microsoft.Network/virtualNetworks/{vnet_name}/subnets/{db_subnet_name}",
private_dns_zone_arm_resource_id=f"/subscriptions/{subscription_id}/resourceGroups/{resource_group_name}/providers/Microsoft.Network/privateDnsZones/{client_name}.<http://private.postgres.database.azure.com|private.postgres.database.azure.com>",
),
identity=azure_native.dbforpostgresql.UserAssignedIdentityArgs(
type='UserAssigned',
user_assigned_identities={
f"/subscriptions/{subscription_id}/resourcegroups/{resource_group_name}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{db_user_assigned_identity_name}" : azure_native.dbforpostgresql.UserIdentityArgs()},
),
data_encryption=azure_native.dbforpostgresql.DataEncryptionArgs(
type="AzureKeyVault",
primary_key_uri=f"https://{vault_name}.<http://vault.azure.net/keys/{key.name}/{key_version}|vault.azure.net/keys/{key.name}/{key_version}>",
primary_user_assigned_identity_id=f"/subscriptions/{subscription_id}/resourcegroups/{resource_group_name}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{db_user_assigned_identity_name}",
),
tags={
"created_by": author,
},
version=azure_native.dbforpostgresql.ServerVersion.SERVER_VERSION_12,
opts=pulumi.ResourceOptions(depends_on=[
# db_subnet, private_db_dns_zone, db_nsg, vault, db_user_assigned_identity, key, resource_group, storage_subnet,aks_cluster,vnet
db_subnet, private_db_dns_zone, vault, db_user_assigned_identity, key, resource_group, vnet,aks_cluster
],))