tembo-io / tembo

Goodbye Database Sprawl, Hello Postgres.
https://tembo.io
PostgreSQL License
1.09k stars 35 forks source link

`conductor`: Add support for Azure Backup and Restore #980

Closed ianstanton closed 3 weeks ago

ianstanton commented 1 month ago

This PR adds steps for creating the Azure 'IAM' resources necessary for instances to perform backup / restore with Azure Blob Storage.

When an instance using Azure is created:

When an instance using Azure is deleted:

Note: This only supports the backup archive bucket at the moment. We'll add support for the storage archive bucket as a follow-up

ianstanton commented 4 weeks ago

Might be good to add a check like these to make sure you can't set aws or gcp also at the same time. Other than that LGTM! Great work!

    // Error and exit if both IS_CLOUD_FORMATION and IS_GCP are set to true
    if is_cloud_formation && is_gcp {
        panic!("Cannot have both IS_CLOUD_FORMATION and IS_GCP set to true");
    }

    // Error and exit if IS_GCP is true and GCP_PROJECT_ID or GCP_PROJECT_NUMBER are not set
    if is_gcp && (gcp_project_id.is_empty() || gcp_project_number.is_empty()) {
        panic!("GCP_PROJECT_ID and GCP_PROJECT_NUMBER must be set if IS_GCP is true");
    }

Thanks, good suggestion! Addressed here https://github.com/tembo-io/tembo/pull/980/commits/a4b9cd5ef84393c7a6ba4a43f764afad8a0e1d08