Attached Database Configuration
Manages a Kusto (also known as Azure Data Explorer) Attached Database Configuration
Example Usage
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.core.ResourceGroup;
import com.pulumi.azure.core.ResourceGroupArgs;
import com.pulumi.azure.kusto.Cluster;
import com.pulumi.azure.kusto.ClusterArgs;
import com.pulumi.azure.kusto.inputs.ClusterSkuArgs;
import com.pulumi.azure.kusto.Database;
import com.pulumi.azure.kusto.DatabaseArgs;
import com.pulumi.azure.kusto.AttachedDatabaseConfiguration;
import com.pulumi.azure.kusto.AttachedDatabaseConfigurationArgs;
import com.pulumi.azure.kusto.inputs.AttachedDatabaseConfigurationSharingArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new ResourceGroup("example", ResourceGroupArgs.builder()
.name("my-kusto-rg")
.location("West Europe")
.build());
var followerCluster = new Cluster("followerCluster", ClusterArgs.builder()
.name("cluster1")
.location(example.location())
.resourceGroupName(example.name())
.sku(ClusterSkuArgs.builder()
.name("Dev(No SLA)_Standard_D11_v2")
.capacity(1)
.build())
.build());
var followedCluster = new Cluster("followedCluster", ClusterArgs.builder()
.name("cluster2")
.location(example.location())
.resourceGroupName(example.name())
.sku(ClusterSkuArgs.builder()
.name("Dev(No SLA)_Standard_D11_v2")
.capacity(1)
.build())
.build());
var followedDatabase = new Database("followedDatabase", DatabaseArgs.builder()
.name("my-followed-database")
.resourceGroupName(example.name())
.location(example.location())
.clusterName(followerCluster.name())
.build());
var exampleDatabase = new Database("exampleDatabase", DatabaseArgs.builder()
.name("example")
.resourceGroupName(example.name())
.location(example.location())
.clusterName(followerCluster.name())
.build());
var exampleAttachedDatabaseConfiguration = new AttachedDatabaseConfiguration("exampleAttachedDatabaseConfiguration", AttachedDatabaseConfigurationArgs.builder()
.name("configuration1")
.resourceGroupName(example.name())
.location(example.location())
.clusterName(followerCluster.name())
.clusterResourceId(followedCluster.id())
.databaseName(exampleDatabase.name())
.sharing(AttachedDatabaseConfigurationSharingArgs.builder()
.externalTablesToExcludes("ExternalTable2")
.externalTablesToIncludes("ExternalTable1")
.materializedViewsToExcludes("MaterializedViewTable2")
.materializedViewsToIncludes("MaterializedViewTable1")
.tablesToExcludes("Table2")
.tablesToIncludes("Table1")
.build())
.build());
}
}
Content copied to clipboard
Import
Kusto Attached Database Configurations can be imported using the resource id
, e.g.
$ pulumi import azure:kusto/attachedDatabaseConfiguration:AttachedDatabaseConfiguration example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Kusto/clusters/cluster1/attachedDatabaseConfigurations/configuration1
Content copied to clipboard