Skip to main content

alien_core/import/data/azure/
postgres.rs

1use serde::{Deserialize, Serialize};
2
3/// Azure Postgres (Flexible Server + Private Endpoint) registration data: the handles by
4/// which a setup-created Flexible Server (with its Private Endpoint, private DNS zone, and
5/// the Key Vault secret holding the master password) is registered as a Frozen Postgres
6/// resource. Setup owns the server, Alien refreshes and heartbeats it. The raw password is
7/// never carried, only the Key Vault secret URI.
8#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
9#[cfg_attr(feature = "openapi", derive(utoipa::ToSchema))]
10#[cfg_attr(feature = "jsonschema", derive(schemars::JsonSchema))]
11#[serde(rename_all = "camelCase")]
12pub struct AzureFlexibleServerPostgresImportData {
13    /// Flexible Server name on Azure.
14    pub server_name: String,
15    /// Full ARM resource id of the Flexible Server (the deletable handle).
16    pub server_resource_id: String,
17    /// Resource group the server lives in.
18    pub resource_group: String,
19    /// Default database name.
20    pub database: String,
21    /// Private DNS FQDN host workloads resolve to reach the server (the binding host).
22    pub host: String,
23    /// Key Vault base URL holding the password (e.g. `https://<vault>.vault.azure.net`).
24    pub key_vault_url: String,
25    /// Key Vault secret name of the master password (never the password).
26    pub password_secret_name: String,
27    /// Key Vault secret URI of the master password; the binding carries this and the
28    /// workload resolves the value at load time.
29    pub password_secret_uri: String,
30    /// Private Endpoint name fronting the server in the dedicated PE subnet.
31    pub private_endpoint_name: String,
32    /// Azure region the server lives in.
33    pub region: String,
34    /// Engine version the server reports.
35    pub version: String,
36}