https://pulumi.com logo
Title
e

eager-byte-63000

05/21/2021, 9:16 AM
Hello there! Is anybody aware about a proper way to migrate documentdb DatabaseAccountSqlDatabase and DatabaseAccountSqlContainer recourses to azure-native? TL;DR: Following the migration guide, when I try to execute 
pulumi import azure-native:documentdb:DatabaseAccountSqlDatabase databaseName databaseName
I get the following error:
azure-native:documentdb:DatabaseAccountSqlDatabase:
    error: azure-native:documentdb:DatabaseAccountSqlDatabase resource '[dbname]' has a problem: missing required property 'options'
    error: azure-native:documentdb:DatabaseAccountSqlDatabase resource '[dbname]' has a problem: missing required property 'resource'
    error: Preview failed: one or more inputs failed to validate
If I execute 
pulumi import azure-native:documentdb:SqlResourceSqlDatabase databaseName /subscriptions/subid/resourceGroups/rg1/providers/Microsoft.DocumentDB/databaseAccounts/ddb1/sqlDatabases/databaseName
 apparently it imports db successfully but it doesn't go well for containers: when I execute 
pulumi import azure-native:documentdb:SqlResourceSqlContainer containerName /subscriptions/subid/resourceGroups/rg1/providers/Microsoft.DocumentDB/databaseAccounts/ddb1/sqlDatabases/databaseName/sqlContainers/containerName
 I get the following error:
azure-native:documentdb:SqlResourceSqlContainer:
    error: Preview failed: autorest/azure: Service returned an error. Status=400 Code="BadRequest" Message="The request path <https://cdbmgmtprodsg.documents.azure.com:450/subscriptions/[id]/resourceGroups/[resourceGroup]/providers/Microsoft.DocumentDB/databaseAccounts/[dbAccount]/sqlDatabases/uploaddb/sqlContainers/[containerName]?api-version=2021-01-15> is invalid.\r\nActivityId: 7d3e4a6e-0f4d-4fdf-9af7-e4951e98c388, Microsoft.Azure.Documents.Common/2.11.0"
Any help is very appreciated!
b

brave-planet-10645

05/21/2021, 9:23 AM
Hi Marta,
That doesn't look right. Let me take a look at this
@eager-byte-63000 I'm not sure what's going on here. Would you mind opening an issue here please: https://github.com/pulumi/pulumi-azure-native/issues
e

eager-byte-63000

05/24/2021, 2:06 AM
@brave-planet-10645 thank you for looking at it! I've created a github-issue: https://github.com/pulumi/pulumi-azure-native/issues/871