Skip to content

Commit

Permalink
data-plane-controller: bastion_address and bastion_private_key export…
Browse files Browse the repository at this point in the history
… columns
  • Loading branch information
mdibaiee committed Feb 24, 2025
1 parent 65112fb commit 3c3ab46
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
8 changes: 7 additions & 1 deletion crates/data-plane-controller/src/controller.rs
Original file line number Diff line number Diff line change
Expand Up @@ -926,6 +926,8 @@ impl automations::Outcome for Outcome {
gcp_service_account_email,
hmac_keys,
ssh_key: _,
bastion_address,
bastion_private_key,
}) = self.publish_exports
{
_ = sqlx::query!(
Expand All @@ -935,7 +937,9 @@ impl automations::Outcome for Outcome {
aws_link_endpoints = $4,
cidr_blocks = $5,
gcp_service_account_email = $6,
hmac_keys = $7
hmac_keys = $7,
bastion_address = $8,
bastion_private_key = $9
WHERE id = $1 AND controller_task_id = $2
"#,
self.data_plane_id as models::Id,
Expand All @@ -945,6 +949,8 @@ impl automations::Outcome for Outcome {
&cidr_blocks,
gcp_service_account_email,
&hmac_keys,
bastion_address,
bastion_private_key,
)
.execute(&mut *txn)
.await
Expand Down
3 changes: 3 additions & 0 deletions crates/data-plane-controller/src/stack.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,9 @@ pub struct ControlExports {
pub gcp_service_account_email: String,
pub hmac_keys: Vec<String>,
pub ssh_key: String,
pub bastion_address: Option<String>,
pub bastion_private_key: Option<String>,
}

#[derive(Debug, serde::Deserialize, serde::Serialize)]
pub struct PulumiStackResourceChanges {
Expand Down
10 changes: 10 additions & 0 deletions supabase/migrations/20250224150353_data_plane_bastion.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
-- Add bastion-related info columns that should be exposed to customers

begin;

-- Address for connecting to the bastion
ALTER TABLE public.data_planes ADD bastion_address TEXT;
-- Private key to be used for connecting to bastion
ALTER TABLE public.data_planes ADD bastion_private_key TEXT;

commit;

0 comments on commit 3c3ab46

Please sign in to comment.