This message was deleted.
# azure
s
This message was deleted.
r
I needed to solve a similar problem a while back and could not find a way to do what you describe (C# azure-native). What I ended up doing instead was creating an Azure database from the bapac manually, and using it as a source like you already pointed out. It seems that cloning speed is not related to database tier, so you can get away with a very cheap instance.
One workaround (although complicated) I can think of is a solution with a storage account, poweshell/other script and container instances. If you upload your bacpac to a storage account you should be able to mount it in a container instance together with a script that could run your database import/creation
i
I’d consider using Pulumi to manage the DB / infra itself, but use some other script/automation to orchestrate loading the data into the database (CI/CD, etc)).
a
@icy-doctor-13719 @rapid-engineer-94232 - Yeah I ended up spinning up an empty Azure SQL DB with Pulumi and then restored the bacpac with a script using the
sqlpackage
cli. There's a caveat though, as bacpac imports have to be done during the initial provisioning of the DB as it has to be completely empty. The workaround to be able to restore from bacpac on a newly/already provisioned Azure SQL DB, as described here, is to drop all triggers, procedures, functions, tables, views etc. before running the sqlpackage bacpac import. A bit hacky IMO but worked out ok...
👍 1