azurermDataShareDatasetKustoDatabase
Manages a Data Share Kusto Database Dataset.
Example Usage
/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as azurerm from "./.gen/providers/azurerm";
/*The following providers are missing schema information and might need manual adjustments to synthesize correctly: azurerm.
For a more precise conversion please use the --provider flag in convert.*/
new azurerm.provider.AzurermProvider(this, "azurerm", {
features: [{}],
});
const azurermResourceGroupExample = new azurerm.resourceGroup.ResourceGroup(
this,
"example",
{
location: "West Europe",
name: "example-resources",
}
);
const azurermDataShareAccountExample =
new azurerm.dataShareAccount.DataShareAccount(this, "example_2", {
identity: [
{
type: "SystemAssigned",
},
],
location: azurermResourceGroupExample.location,
name: "example-dsa",
resource_group_name: azurermResourceGroupExample.name,
});
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermDataShareAccountExample.overrideLogicalId("example");
const azurermKustoClusterExample = new azurerm.kustoCluster.KustoCluster(
this,
"example_3",
{
location: azurermResourceGroupExample.location,
name: "examplekc",
resource_group_name: azurermResourceGroupExample.name,
sku: [
{
capacity: 1,
name: "Dev(No SLA)_Standard_D11_v2",
},
],
}
);
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermKustoClusterExample.overrideLogicalId("example");
const azurermKustoDatabaseExample = new azurerm.kustoDatabase.KustoDatabase(
this,
"example_4",
{
cluster_name: azurermKustoClusterExample.name,
location: azurermResourceGroupExample.location,
name: "examplekd",
resource_group_name: azurermResourceGroupExample.name,
}
);
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermKustoDatabaseExample.overrideLogicalId("example");
const azurermRoleAssignmentExample = new azurerm.roleAssignment.RoleAssignment(
this,
"example_5",
{
principal_id: `\${${azurermDataShareAccountExample.identity}.0.principal_id}`,
role_definition_name: "Contributor",
scope: azurermKustoClusterExample.id,
}
);
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermRoleAssignmentExample.overrideLogicalId("example");
const azurermDataShareExample = new azurerm.dataShare.DataShare(
this,
"example_6",
{
account_id: azurermDataShareAccountExample.id,
kind: "InPlace",
name: "example_ds",
}
);
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermDataShareExample.overrideLogicalId("example");
const azurermDataShareDatasetKustoDatabaseExample =
new azurerm.dataShareDatasetKustoDatabase.DataShareDatasetKustoDatabase(
this,
"example_7",
{
depends_on: [`\${${azurermRoleAssignmentExample.fqn}}`],
kusto_database_id: azurermKustoDatabaseExample.id,
name: "example-dskd",
share_id: azurermDataShareExample.id,
}
);
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermDataShareDatasetKustoDatabaseExample.overrideLogicalId("example");
Arguments Reference
The following arguments are supported:
-
name
- (Required) The name which should be used for this Data Share Kusto Database Dataset. Changing this forces a new Data Share Kusto Database Dataset to be created. -
shareId
- (Required) The resource ID of the Data Share where this Data Share Kusto Database Dataset should be created. Changing this forces a new Data Share Kusto Database Dataset to be created. -
kustoDatabaseId
- (Required) The resource ID of the Kusto Cluster Database to be shared with the receiver. Changing this forces a new Data Share Kusto Database Dataset to be created.
Attributes Reference
In addition to the Arguments listed above - the following Attributes are exported:
-
id
- The resource ID of the Data Share Kusto Database Dataset. -
displayName
- The name of the Data Share Dataset. -
kustoClusterLocation
- The location of the Kusto Cluster.
Timeouts
The timeouts
block allows you to specify timeouts for certain actions:
create
- (Defaults to 30 minutes) Used when creating the Data Share Kusto Database Dataset.read
- (Defaults to 5 minutes) Used when retrieving the Data Share Kusto Database Dataset.delete
- (Defaults to 30 minutes) Used when deleting the Data Share Kusto Database Dataset.
Import
Data Share Kusto Database Datasets can be imported using the resourceId
, e.g.