07/09/2020, 3:20 PM
Hello guys! I've encountered a very weird behaviour in one of our deployments. The issue is with creating new
Sql Database
as copy from existing one. I use
C# sdk
and i use following code:
var sqlDatabase = new Database(
                new DatabaseArgs
                    Name = $"{conf.StackResourcesPrefix}-db",
                    ResourceGroupName = resourceGroup.GetResourceName(),
                    CreateMode = "Copy",
                    ServerName = sqlServer.Name,
                    SourceDatabaseId = <FULL_ID_OF_THE_SOURCE_DB>
I've checked many times, that everything is correct (mainly the
). When i deploy the infrastructure with pulumi, the database is not copied, but it creates new one (pulumi does not fail, does not log warning that something went wrong) without any data from the existing one I'm trying to copy. everything with authorization and stuff should be ok, our solution with azure templates & powershell scripts works correctly as expected and as far as i know, pulumi should do behind the scenes almost the same stuff as the powershell scripts do (calling the Azure API). Isn't this a bug? How is it possible, that pulumi fails to create the desired resource by the configuration, but says everything is okay and doesn't show any warnings / errors? Could somebody help me please with what could get wrong?