limited-carpenter-34991
06/17/2021, 2:15 PMtall-librarian-49374
06/17/2021, 2:20 PMDatabase
is deprecated (you should see this in its docs)DataConnection
ResourceNotFound
suggests that maybe the parent resource does not exist with the names you specified?limited-carpenter-34991
06/17/2021, 3:01 PMvar database = new AzureNative.Kusto.ReadWriteDatabase($"historyItemsDb{environment}"
and when i use database.Name it uses a wrong resource identifier for the EventHubDataConnection and then error ResourceNotFound
will be raised.tall-librarian-49374
06/17/2021, 8:01 PMlimited-carpenter-34991
06/21/2021, 2:10 PMtall-librarian-49374
06/21/2021, 2:32 PMlimited-carpenter-34991
06/21/2021, 2:38 PMvar scripts = System.IO.Directory.GetFiles("./scripts");
Console.WriteLine($"script len: {scripts.Length}");
AzureNative.Kusto.Script[] adxScripts = new AzureNative.Kusto.Script[scripts.Length];
Blob[] blobs = new Blob[scripts.Length];
for (int i = 0; i < scripts.Length; i++)
{
Console.WriteLine($"script {i}: {scripts[i]}");
blobs[i] = new Blob($"scriptBlop{i + 1}", new BlobArgs
{
AccountName = scripStorageAccount.Name,
ResourceGroupName = resourceGroup,
Type = BlobType.Block,
ContainerName = scriptContainer.Name,
Source = new FileAsset(scripts[i]),
});
if (i == 0)
{
adxScripts[i] = new AzureNative.Kusto.Script($"script{i + 1}", new AzureNative.Kusto.ScriptArgs
{
ClusterName = adx.Name,
ContinueOnErrors = true,
DatabaseName = $"historyItemsDb{environment}",
ResourceGroupName = resourceGroup,
ScriptName = $"script{i + 1}",
ScriptUrl = blobs[i].Url,
ScriptUrlSasToken = Output.Tuple(resourceGroup, scripStorageAccount.Name).Apply(names =>
Output.CreateSecret(GetStorageAccountPrimaryKey(names.Item1, names.Item2)))
}, new CustomResourceOptions
{
DependsOn = { blobs[i], database }
});
}
else
{
adxScripts[i] = new AzureNative.Kusto.Script($"script{i + 1}", new AzureNative.Kusto.ScriptArgs
{
ClusterName = adx.Name,
ContinueOnErrors = true,
DatabaseName = $"historyItemsDb{environment}",
ResourceGroupName = resourceGroup,
ScriptName = $"script{i + 1}",
ScriptUrl = blobs[i].Url,
ScriptUrlSasToken = Output.Tuple(resourceGroup, scripStorageAccount.Name).Apply(names =>
Output.CreateSecret(GetStorageAccountPrimaryKey(names.Item1, names.Item2)))
}, new CustomResourceOptions
{
DependsOn = { blobs[i], adxScripts[i - 1] }
});
}
}