Skip to content

Data Source: azurermDataShare

Use this data source to access information about an existing Data Share.

Example Usage

import * as cdktf from "cdktf";
/*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 dataAzurermDataShareAccountExample =
  new azurerm.dataAzurermDataShareAccount.DataAzurermDataShareAccount(
    this,
    "example",
    {
      name: "example-account",
      resource_group_name: "example-resource-group",
    }
  );
const dataAzurermDataShareExample =
  new azurerm.dataAzurermDataShare.DataAzurermDataShare(this, "example_2", {
    account_id: dataAzurermDataShareAccountExample.id,
    name: "existing",
  });
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
dataAzurermDataShareExample.overrideLogicalId("example");
new cdktf.TerraformOutput(this, "id", {
  value: dataAzurermDataShareExample.id,
});

Arguments Reference

The following arguments are supported:

  • name - (Required) The name of this Data Share.

  • accountId - (Required) The ID of the Data Share account in which the Data Share is created.

Attributes Reference

In addition to the Arguments listed above - the following Attributes are exported:

  • id - The ID of the Data Share.

  • kind - The kind of the Data Share.

  • description - The description of the Data Share.

  • snapshotSchedule - A snapshotSchedule block as defined below.

  • terms - The terms of the Data Share.


A snapshotSchedule block exports the following:

  • name - The name of the snapshot schedule.

  • recurrence - The interval of the synchronization with the source data.

  • startTime - The synchronization with the source data's start time.

Timeouts

The timeouts block allows you to specify timeouts for certain actions:

  • read - (Defaults to 5 minutes) Used when retrieving the Data Share.