Skip to content

azurermDataShareDatasetKustoCluster

Manages a Data Share Kusto Cluster 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 azurermRoleAssignmentExample = new azurerm.roleAssignment.RoleAssignment(
  this,
  "example_4",
  {
    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_5",
  {
    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 azurermDataShareDatasetKustoClusterExample =
  new azurerm.dataShareDatasetKustoCluster.DataShareDatasetKustoCluster(
    this,
    "example_6",
    {
      depends_on: [`\${${azurermRoleAssignmentExample.fqn}}`],
      kusto_cluster_id: azurermKustoClusterExample.id,
      name: "example-dskc",
      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.*/
azurermDataShareDatasetKustoClusterExample.overrideLogicalId("example");

Arguments Reference

The following arguments are supported:

  • name - (Required) The name which should be used for this Data Share Kusto Cluster Dataset. Changing this forces a new Data Share Kusto Cluster Dataset to be created.

  • shareId - (Required) The resource ID of the Data Share where this Data Share Kusto Cluster Dataset should be created. Changing this forces a new Data Share Kusto Cluster Dataset to be created.

  • kustoClusterId - (Required) The resource ID of the Kusto Cluster to be shared with the receiver. Changing this forces a new Data Share Kusto Cluster 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 Cluster 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 Cluster Dataset.
  • read - (Defaults to 5 minutes) Used when retrieving the Data Share Kusto Cluster Dataset.
  • delete - (Defaults to 30 minutes) Used when deleting the Data Share Kusto Cluster Dataset.

Import

Data Share Kusto Cluster Datasets can be imported using the resourceId, e.g.

terraform import azurerm_data_share_dataset_kusto_cluster.example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.DataShare/accounts/account1/shares/share1/dataSets/dataSet1